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

  1. Add the Dataverse List Rows action.
  2. Click the three dots (...).
  3. Select Settings.
  4. Enable Pagination.
  5. Specify the Threshold value.
  6. 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

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

Benefits

Key Takeaways