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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
yasirm
Frequent Visitor

Graph API pagination

Hi,

I am trying to connect to the Graph API via Power Query and have built this logic to get all users from the /users endpoint

let
Data = let
Source = List.Generate( () => [WebCall = GetUsers()],
each Record.HasFields([WebCall], "@odata.nextLink"),
each [WebCall=Json.Document(Web.Contents([WebCall][#"@odata.nextLink"], [Headers = [Authorization = "Bearer " & Access_Token]]))],
each [WebCall]
),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in Source
in
Data


This is working fine except that I am missing some results and the table returned is always in multiples of 100, it seems that when the odata.nextLink field is not found, the current API call response is not appended to the list. What am I missing?

Thank you for your help!

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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