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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
DavidS524
Helper I
Helper I

Azure DevOps Services REST API - Refresh troubleshooting on service

Hello,

 

I am using an API call in a Power BI report which is getting a list of users from Azure DevOps. This has been working correctly up until a few days ago when we noticed some missing data in the report. After tracing the problem back, only 500 records from this API call are being returned. It is hitting the record limit on the API but previuously it worked fine and returned all ~2,000 users. No changes were made on our side to the query prior to it breaking. The problem seems to be the continutation token which is no longer coming through in Power BI Desktop/Service.

 

Any ideas for how to resolve this?

 

Thank you!

 

Here is the documentation for the call I am using.

 

Here is the exact code being used in Power BI:

 

let
NextResult = (token) =>
let
URL = "https://vssps.dev.azure.com/{organization}/_apis/graph/users?api-version=7.1-preview.1",
URLWithContinuation =
if token = null then
URL
else
URL & "&continuationToken=" & token,
Content = VSTS.Contents(URLWithContinuation),
AsJson = Json.Document(Content)[value],
continuationToken = Value.Metadata(Content)[Headers][#"X-MS-ContinuationToken"]?,
Result =
if continuationToken = null then
AsJson
else
AsJson & @NextResult(continuationToken)
in
Result,
AsTable = Table.FromRecords(NextResult(null))
in
NextResult

2 REPLIES 2
Schizzomarino
Helper I
Helper I

Same issue here,
Looks like the security "improvements" have made the continuation token not visible in the VSTS returned headers when queried from cloud resources (such as Power BI Cloud)
This as far as we have been able to tell makes it impossible to query the next pages (provided by the continuation token)

We are hoping MS will fix or provide alternative soon (we have raised a request in this regard)

@Schizzomarino 

Do you have any additional information on the security changes? A blog post or announcement perhaps? I have an open support ticket with Microsoft and so far we have not found a resolution. Even with the logic to grab the continuation token the records returned is always capped at 500. Thank you!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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