How to Retrieve More Than 5000 Records from Dataverse
How to Retrieve More Than 5000 Records from Dataverse
Microsoft Dataverse is a powerful data platform used across Dynamics 365 and Power Platform applications. However, when working with large datasets, many developers encounter the default limitation of retrieving only 5,000 records in a single request.
Fortunately, Power Automate provides pagination capabilities that allow you to retrieve significantly more records efficiently while maintaining performance and reliability.
Understanding the 5000 Record Limit
The Dataverse List Rows action returns a maximum of 5,000 records by default. If your table contains more records, additional rows are not automatically retrieved unless pagination is enabled.
Business Scenario
Suppose your organization maintains 50,000 customer records in Dataverse. A scheduled Power Automate flow must retrieve all records daily and generate a report. Without pagination, only the first 5,000 records would be processed.
Solution: Enable Pagination
- Add the Dataverse List Rows action.
- Click the three dots (...).
- Select Settings.
- Enable Pagination.
- Specify the Threshold value.
- Save the flow.
Pagination Configuration
Pagination = ON Threshold = 100000
Power Automate automatically retrieves records in batches until the specified threshold is reached.
List Rows Configuration
Table Name: Accounts Top Count: 5000
Performance Best Practices
- Use OData filters whenever possible.
- Retrieve only required columns.
- Avoid unnecessary Apply to Each loops.
- Use Select action to minimize payload size.
- Process data in batches when possible.
Example: Retrieve Modified Records
modifiedon ge
@{addMinutes(
utcNow(),
-30
)}
This filter retrieves records modified within the last 30 minutes, reducing processing time significantly.
Important: Although pagination can retrieve large volumes of data, always filter records whenever possible to improve performance and reduce API consumption.Common Use Cases
- Data migration projects
- Scheduled reporting
- Integration with external systems
- Bulk data exports
- Data synchronization
- Analytics processing
Benefits
- Retrieve complete datasets
- Improve automation scalability
- Support enterprise-level integrations
- Reduce manual intervention
- Enable large-scale reporting
Key Takeaways
- Dataverse List Rows returns 5000 records by default.
- Enable Pagination to retrieve larger datasets.
- Configure an appropriate threshold value.
- Use filters to improve performance.
- Pagination is essential for enterprise-scale automation.