Retrieve more than 100,000 Dataverse Rows with List Records Action in Cloud Flow Using Skip Token

- The data of the 5001st row onwards of the output does not contain the value for @OData.Community.Display.V1.FormattedValue
- @odata.nextLink property returns empty which means you cannot use the Skip Token parameter to retrieve the data with a batch of 100k rows
🔗 List Records using oData Queries with Skip Token Parameter
1. Initial Query and Set Skip Token
First, you need to retrieve the initial data with List Records step to get the @odata.nextLink to fetch next page data (if there are more than 5k rows). Make sure the Pagination is disabled in the List Records step setting or else, @odata.nextLink will be empty. This step cannot be inside the loop because the Skip Token parameter cannot be set with any value (not even empty string) or, it will throw "Malformed XML" error.if
(
empty
(
outputs('List_records_using_oData_Queries_Initial_Query')?['body/@odata.nextLink']
),
'',
decodeUriComponent
(
last
(
split
(
uriQuery(outputs('List_records_using_oData_Queries_Initial_Query')?['body/@odata.nextLink']),
'skiptoken='
)
)
)
)
2. Do Until Skip Token is Empty
If there is next page data after the initial query, the Skip Token variable will not be an empty string and the steps in the loop will be processed. The default limit of Until iteration is 60 (5k x 60 = 300k rows) and for larger result sets, you can increase up to 5,000. The List Records step within the loop will be the same as the initial query except populating the Skip Token parameter with the variable.1. Simple Paging using FetchXML
2. Page Large Result Sets using FetchXML with Paging Cookie
if
(
empty(outputs('List_records_using_FetchXML_Initial_Query')?['body']?['@Microsoft.Dynamics.CRM.fetchxmlpagingcookie']),
'',
replace
(
replace
(
replace
(
decodeUriComponent
(
decodeUriComponent
(
first(split(last(split(outputs('List_records_using_FetchXML_Initial_Query')?['body']?['@Microsoft.Dynamics.CRM.fetchxmlpagingcookie'], 'pagingcookie="')), '" '))
)
),
'<', '<'
),
'>', '>'
),
'"','"'
)
)
<cookie pagenumber="2" pagingcookie="%253ccookie%2520page%253d%252291%2522%253e%253ccontactid%2520last%253d%2522%257b21883F50-3084-E911-A850-000D3AE02BC5%257d%2522%2520first%253d%2522%257bB5C46C64-2C84-E911-A850-000D3AE02BC5%257d%2522%2520%252f%253e%253c%252fcookie%253e" istracking="False" />
%253ccookie%2520page%253d%252291%2522%253e%253ccontactid%2520last%253d%2522%257b21883F50-3084-E911-A850-000D3AE02BC5%257d%2522%2520first%253d%2522%257bB5C46C64-2C84-E911-A850-000D3AE02BC5%257d%2522%2520%252f%253e%253c%252fcookie%253e
<cookie page="91"><contactid last="{21883F50-3084-E911-A850-000D3AE02BC5}" first="{B5C46C64-2C84-E911-A850-000D3AE02BC5}" /></cookie>
<cookie page="91"><contactid last="{21883F50-3084-E911-A850-000D3AE02BC5}" first="{B5C46C64-2C84-E911-A850-000D3AE02BC5}" /></cookie>
Summary
Published on:
Learn moreRelated posts
Proactive SLA Risk Notifications in Dynamics 365 Field Service Using Power Automate & Plugins
In the world of Field Service, maintaining Service Level Agreements (SLAs) is critical for customer satisfaction and compliance. But technicia...
“Automating Renewal Reminder Emails in Dynamics 365 with Power Automate (Handling UTC Date Filtering)”
Managing subscription renewals is critical for any business offering SaaS products or long-term service agreements. Missing renewal alerts can...
Part-5:Calling Power Automate with Microsoft Copilot
🚀 How to Use Power Automate Flows in Microsoft Copilot Studio | Hands-On Guide 🎥 In this episode of my Microsoft Copilot Studio series,...
Track Time and Cost Savings with Power Automate’s New “Savings” (Preview) Feature
While creating a Power Automate flow, I discovered an exciting new feature called the “Savings” (Preview) feature in Power Automate. When I tr...
Announcing major DLP enhancements for Power Automate and Copilot Studio
DLP (Data Loss Prevention) for Power Automate enables administrators to manage data access from both cloud and desktop Power Automate flows, a...
Power Automate: Running PowerShell Scripts
Many things can be done in Power Automate or using Microsoft Graph, but not everything. For certain things, Microsoft requires us to use Power...