Forum Discussion
Power BI Service - scheduled refresh failure when using Azure DevOps API
- Anonymous6 years ago
HI YogeshP ,
Maybe you can take a look at the below document to use VSTS.AccountContents to instead web.connect:
Connect using Power Query and Azure DevOps functions
Regards,
Xiaoxin Sheng
Hi YogeshP ,
I'd like to suggest you enable 'relative path' optional parameter to split URL to root path and relative path and add your authority credentials in the header.
Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code
For example:
let
Source = Json.Document(Web.Contents("https://[instance-name].visualstudio.com/", [Headers=[Authorization="Basic " & Credentials],RelativePath="DefaultCollection/[project-name]/_apis/wit/wiql/[query-guid]"]))
in
Source
After these, you can use anonymous mode to refresh your report from web API.
Regards,
Xiaoxin Sheng
Anonymous
As directed I used it as below:
let
Source = Json.Document(Web.Contents("https://[instance-name].visualstudio.com/", [Headers=[Authorization=Text.Combine({"Basic ", Binary.ToText(Text.ToBinary("USERNAME:PASSWORD"),0)})], RelativePath="DefaultCollection/[project-name]/_apis/wit/wiql/[query-guid]"]))
in
SourceIt gave me the error: The 'Authorization' header is only supported when connecting anonymously.....
Later I changed the data source settings to 'Anonymous' method, it gave the error:
DataFormat.Error: We found extra characters at the end of JSON input.
Details:
Value=
Position=4
Probably as it returned a non-JSON reponse (HTML page asking to sign-in)
Later I changed removed the 'Header' part as tried again (with anonymous and org authorization), it gave the same above error.
- Anonymous6 years agoNot applicable
HI YogeshP ,
Maybe you can take a look at the below document to use VSTS.AccountContents to instead web.connect:
Connect using Power Query and Azure DevOps functions
Regards,
Xiaoxin Sheng
- YogeshP6 years agoNew Member
Anonymous It gave the below error.
- Anonymous6 years agoNot applicable
Hi YogeshP ,
According to your error message snapshot, it means VSTS.Account Contents connector not available to power bi service.
In addition, I also check the blog you mentioned but it seems to invoked custom function that power bi service not fully support.
I'd like to suggest you submit an idea to improve azure DevOps connector features.Regards,
Xiaoxin Sheng