keycloak/keycloak-nodejs-admin-client

Add a user count helper

Closed this issue · 1 comments

I want to paginate the data when fetching users, the problem is I have to get the total count of users to generate a metadata. Fetching all users and getting its count would defeat the purpose of my pagination.

The solution is obviously getting the count of the users. There is an API available in the docs where I can get the count of the users, but there is no available helper here in the package.

Even a total count of users is to expensive as users can come from external systems like ldap. So there is no total count in the API. You can still paginate, but you can't show the number of pages.
image
This is a screenshot of how we display it in the admin client ^^