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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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