cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jagadeesan
Regular Visitor

Cannot communicate to Azure Devops API through any authentication

I have an extension in Azure Devops that allows HTTP GET on https://{organisation}.extmgmt.visualstudio.com/_apis/ExtensionManagement/InstalledExtensions/timelog/time-logging-extension/Data/Scopes/Default/Current/Collections/TimeLogData/Documents/ and it returns JSON data. This works fine in browser but I can't get it to load using 'Web' data source in Power Query/BI. I'm stuck at the authentication page.

 

  1. When I use 'Organizational Account' type authentication, the error I'm getting is, "The resource principal named https://{organisation}.extmgmt.visualstudio.com was not found in the tenant named {tenant-id}. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant."
  2. When I try to use Personal Access Token (PAT) in Azure (with full access), I couldn't get through the authentication page! This is the code I tried is something like:

 

let
Source = Web.Contents("https://{org}.extmgmt.visualstudio.com/_apis/ExtensionManagement/InstalledExtensions/timelog/time-logging-extension/Data/Scopes/Default/Current/Collections/TimeLogData/Documents/", [Headers=[Accept="application/json", Authorization="Basic cXZvMjNhNHhneGNza29kN203NTQ1cTBuFczbWdvbGlhdXFxYWpnMzVqa2hnZjNlc2FmcQ=="]]),
Result = Json.Document(Source)
in
Result

 

Can you advise what kind of authentication mechanism (and how it) can be used to get this resultset through programs like PowerQuery editor? I just want the output JSON to become a data source for Power BI.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
jagadeesan
Regular Visitor

Re: Cannot communicate to Azure Devops API through any authentication

Never mind, I got the resultset with this:

let
    Source = VSTS.Contents("https://{org}.extmgmt.visualstudio.com/_apis/ExtensionManagement/InstalledExtensions/timelog/time-logging-extension/Data/Scopes/Default/Current/Collections/TimeLogData/Documents/"),
    #"Imported JSON" = Table.FromRecords(Json.Document(Source,65001)[value])
in
    #"Imported JSON"

 

Thanks!

View solution in original post

1 REPLY 1
jagadeesan
Regular Visitor

Re: Cannot communicate to Azure Devops API through any authentication

Never mind, I got the resultset with this:

let
    Source = VSTS.Contents("https://{org}.extmgmt.visualstudio.com/_apis/ExtensionManagement/InstalledExtensions/timelog/time-logging-extension/Data/Scopes/Default/Current/Collections/TimeLogData/Documents/"),
    #"Imported JSON" = Table.FromRecords(Json.Document(Source,65001)[value])
in
    #"Imported JSON"

 

Thanks!

View solution in original post

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.