Open Eli-Black-Work opened 2 years ago
It's probably not the best approach but I'm using a microservice called user-management that also addresses this issue. I'm connecting to a secondary data source (keycloak's schema) and sorting the users using my own parameters. However, if this feature came out, I would appreciate it!
I agree, this feature would be very helpful.
In the meantime, I am doing same as @JoseOliveira01. The problem with this microservice approach is that in order to perform sorting, one has to get the whole list of users in the memory of the microservice and then return the list. This is not scalable if one has lots of users. Plus we cannot use keycloak's pagination.
Description
The REST API (https://github.com/keycloak/keycloak-community/blob/main/design/rest-api-guideline.md) supports pagination and filtering, but not sorting.
Being able to sort by a column would make pagination more useful, as the user could sort by a non-default column and request only one page of results.
For example, consider a table where a user can click on a column header to sort the table by that column:
When someone clicks the "Last name" column header, the table should be sorted by the last name. The table is divided into several pages of results, because there are many users in the system.
Without being able to sort by the "Last name" field via the REST API, the frontend needs to retrieve the data for all users, and sorting performed via the frontend. This can be quite a bit of data if the Keycloak has a lot of users.
If we could sort via the backend, the frontend would only need to download a small subset of the results 🙂
Discussion
No response
Motivation
No response
Details
No response