cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Riddletonm
Level: Powered On

Create a Collection form an Azure DevOps Rest API

Hi All,

 

I am wanting to get a list of Projects within an organisation in Azure DevOps and put them in a collection in PowerApps.

 

The REST API I am trying to use is an Azure DevOps API, https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-5.1.

 

I have created a custom connector, named AzureProjectList, using OAuth 2.0/Active Directory authentication.

I have then create a new button, and added the code ClearCollect(Projects, AzureProjectList.ListProjects()) to the OnSelect property of a button.

 

When I clcik the button, I get an error AzureProjectList.ListProjects failed: The data returned in the response is invalid.

 

Has anyone else managed to achieve this?  Any help would be much appreciated! 

3 REPLIES 3
Dual Super User
Dual Super User

Re: Create a Collection form an Azure DevOps Rest API

Hi @Riddletonm 

 

Can you please share more info about the response that you have defined in the Action definition section? I am guessing that there is mismatch of the response type and the response format passed while validation.
 
Also, are you getting expected result in the "Test" tab of custom connector?
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Riddletonm
Level: Powered On

Re: Create a Collection form an Azure DevOps Rest API

Hello, 

Thanks for the quick response!

I have a screen shot of the response set up in the connector (I have also edited each of the fields and entered a title to match the description).

Response.PNG

I imported from sample, and copied entered the response from calling the APi directly into the Body of the import from sample form.

Body.PNG

The test response which is returned is attached, however, I guess this is testing the authorisation as opposed to the actaul API.

Test response.PNG

Dual Super User
Dual Super User

Re: Create a Collection form an Azure DevOps Rest API

Hi @Riddletonm 

 

The issue here is with the authentication of the user. Please create a registration for your application and pass in the required parameters in the Security tab, this will authenticate the request and return the results.
 
Also, use the below while setting up the security:
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,317)