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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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