Forum Discussion
Need Help with Microsoft Graph API Pagination in Power Query
- 1 year ago
Hi Zack92 ,
Thank you for reaching out to Microsoft community support,
It seems like pagination is not handled properly.
The API response includes an @odata.nextLink property when there are more items to fetch beyond the initial page.
If your code does not correctly use @odata.nextLink to retrieve subsequent pages, you'll only get the first 30 results.
In your current code, the logic for fetching subsequent pages via GetALLpages might not be working as intended, resulting in only the first page being retrieved.This documentation may help you in your error
Paging Microsoft Graph data in your app - Microsoft Graph | Microsoft LearnIf the issue persists, consider using Power Automate (formerly Flow) to retrieve data with Graph API pagination and save it to a file or data source that Power Query can access. Power Automate handles pagination more seamlessly.
Please consider Accepting the solution if the provided answer meets your requirement so as to help other users or get back to us if you have further queries.
Thanks and Regards
Hi Zack92 ,
Thank you for reaching out to Microsoft community support,
It seems like pagination is not handled properly.
The API response includes an @odata.nextLink property when there are more items to fetch beyond the initial page.
If your code does not correctly use @odata.nextLink to retrieve subsequent pages, you'll only get the first 30 results.
In your current code, the logic for fetching subsequent pages via GetALLpages might not be working as intended, resulting in only the first page being retrieved.
This documentation may help you in your error
Paging Microsoft Graph data in your app - Microsoft Graph | Microsoft Learn
If the issue persists, consider using Power Automate (formerly Flow) to retrieve data with Graph API pagination and save it to a file or data source that Power Query can access. Power Automate handles pagination more seamlessly.
Please consider Accepting the solution if the provided answer meets your requirement so as to help other users or get back to us if you have further queries.
Thanks and Regards