Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
YogeshP
New Member

Power BI Service - scheduled refresh failure when using Azure DevOps API

I have connected my Power BI report to the Azure DevOps data, using AzureDevOps connector (beta). Since this doesn't support the multi line text field data under it's data set, I have referred this document and used the queries option to call the Azure DevOps REST API to fetch this data.

The report refreshes successfully when used in Power BI desktop app. But the refresh fails when published to the Power BI service with the message "You can't schedule refresh for this dataset because the following data sources currently don't support refresh".

Is there any fix for this or any work around to get the multi line text field data and it successfully refreshes in the Power BI service ?

1 ACCEPTED SOLUTION

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft 

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
    Source

It 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.

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft It gave the below error.

1.PNG

 

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors