cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seanmcn
Microsoft
Microsoft

Example of Paging with Skip and SkipToken in flow?

I'd like to build out a Flow that would access the Microsoft Graph API, which I'm finding quite a few samples on.  However, it's likely that I'll need to page through the results as I'll be pulling in many records to process.  Does anyone have a sample Flow or have screenshots on a proven/known way to page through results and call the API until we have all the results?  

 

Thanks!

3 REPLIES 3
v-xida-msft
Community Support
Community Support

Hi @seanmcn,

 

Could you please share a screenshot of your flow's configuration?

Do you use the HTTP action to access your Microsoft Graph API within your flow?

Do you want to handle more records than are returned in a single call from your Microsoft Graph API?

Further, could you please show more details about your scenario?

 

If you use the HTTP action to access your Microsoft Graph API and you want to handle more records than are returned in a single call from your Microsoft Graph API, I think the Pagination option within the Settings menu of your HTTP action could achieve your needs.

 

I suppose that you add a "HTTP" action within your flow, is it true? Please click "Menu" button of your HTTP action and then select Settings option as below:20.JPG

Within Settings panel for "HTTP", please enable Pagination option and then configure the Limit property:21.JPG

 

 

More details about the Pagination option, please check the following article:

https://flow.microsoft.com/en-us/blog/four-connector-action-settings/

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Kris, thanks for the reply!  Specifically to answer your questions: 

 

Could you please share a screenshot of your flow's configuration? I haven't created a final flow yet, it's going to be relatively basic pulling from the Graph and keeping a list of users in sync in a CRM system. 

 

Do you use the HTTP action to access your Microsoft Graph API within your flow? Yes, it would be the generic HTTP action. 

 

Do you want to handle more records than are returned in a single call from your Microsoft Graph API? Yes

 

Further, could you please show more details about your scenario?  Yes, I was going to be using the Microsoft Graph to retrieve a fitlered list of AD Users (into the tens of thousands).  The query would be all enabled users not containing "#" in their UPN. The results would then be used to ensure each user is listed as a 'contact' in a CRM system (simple contact details, name & email maybe title). 

 

I wasn't sure if there was a known way to implement paging with the Graph or if it generally would work "plug and play" as-is with the paging settings on the HTTP Action connector. I was also hoping I could find some documentation or someone with previous experience using the graph with the HTTP Action connector and paging - if not I'll give it a shot myself and see how it goes. 

 

Thanks for the response! 

beckemzj
Frequent Visitor

This video should be helpful for those of you trying to use Power Automate for looping through a large number of records: https://youtu.be/5NtzcfmSGes

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,442)