Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

how to do pagination in MS Dynamics REST APIs

Posted on by 30
I want to implement pagination in the API:
 
[dynamics_instance_url]/api/data/v9.0/roles?$select=_businessunitid_value,roleid
 
Currently, it is giving me a list of all the security roles inside the MS Dynamics instance. I want to get 50 results at a time. I tried implementing the
$top and $skip query parameters but, the $skip parameter is only supported in the CRM platform. 
 
How can I implement the pagination on the returned response irrespective of the Dynamics platform? 
  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    how to do pagination in MS Dynamics REST APIs?
    Hi Partner,
    Please refer to the following link:
    Dataverse doesn't support the $skip query option, so you can't use the the combination of $top and $skip for paging.
    1.Paging Regular Queries
    Use the Prefer: odata.maxpagesize request header to control the number of records returned. 
    2.Paging with FetchXML

    I hope you can verify my answer if it helps you! If you have any questions, please feel free to contact me.
    Regards,
    Leah

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans