Search code examples
keycloak

keycloak - does keycloak have any endpoint to get list of user paginated


I am trying to get list of user paginated I tried work with this endpoint

GET /admin/realms/{realm}/users

but the response contain all the user.


Solution

  • Endpoint GET /admin/realms/{realm}/users supports pagination (look at method source code)

    Just add query params first & max to your request. For example:
    /auth/admin/realms/<your realm>/users?briefRepresentation=true&first=0&max=5

    P.S. Total records count will be returned in response headers