Unable to paginate more than 1000 records when getting user roles
Sep 10, 2025
Overview
When calling out the Management API endpoint /api/v2/roles/{id}/users in order to paginate over all the users assigned to a role an error is returned after requesting a certain number of pages.
Symptoms
The response to the request returns a 400 status code and contains the following error message:
Requesting page 10 exceeds the allowed maximum of 1000 records. To fetch results beyond 1000, use the checkpoint pagination method.
Applies To
- API endpoint
/api/v2/roles/{id}/users
Cause
N * RPP + RPP > 1000where N is the page index being requested and RPP is the number of records per page being requested. For example, when requesting 100 records per page the error will be thrown when page index is the value 10.
Have in mind that the above logic is independent of the actual number of records (users) associated to the role; even if the role has less than 1000 users associated with it the endpoint will report an error if an attempt is made to request a page index that would go over the maximum based on the number of per page records being requested.
Solution