Microsoft Graph (Azure AD)
Original Data Source
Create a normal Microsoft Graph data source and select the data you want to paginate over.
For example:
https://graph.microsoft.com/v1.0/users?$top=999
Don’t forget to increase the maximum page size to 999
Paginated Data Source
Create a second data source of type Paginated Data Source
and select the original Microsoft Graph API data source.
The pagination type here is called Follow URL
because the URL of the next page will be returned with each response.
URL Selector
Specify the location of URL for the next page:
$['@odata.nextLink']
Result Selector
Specify the location of all records for each page:
$.value[*]
Finish Condition
The Graph API will send a follow-up URL until the last page is reached. Thus, select Empty Target
as a Finish Condition
.
Finish Target
Once Graph API doesn't return a URL, we know it's the last page and stop pagination.
$['@odata.nextLink']
Testing the data source should now return a valid result indicating that the data source is ready for use.