/admin/realms/admin/users does not return [UserRepresentation]

When doing a GET to /admin/realms/admin/users, I get a slim version of UserRepresentation:


I need for instance groups to also be returned.

Any idea why this is happening?

Anyone with any ideas?

This is the representation returned by the GET /{realm}/users endpoint of the current Admin API. In order to get the user’s groups, you have to call the GET /{realm}/users/{id}/groups endpoint: Keycloak Admin REST API

1 Like

Hi all,

What is the corresponding class for the endpoints HTTPGET "admin/realms/{{realm}}/users/{{userId}} and HTTPGET “admin/realms/{{realm}}/ui-ext/brute-force-user?briefRepresentation=false&first=0&max=11&search=*”, HTTPPUT "admin/realms/{{realm}}/users/{{userId}} ?
Is this one https://github.com/keycloak/keycloak/blob/main/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java?

Thank you in advance!

Yes. Those idm classes are the ones used by the API methods.

1 Like