When doing a GET to /admin/realms/admin/users , I get a slim version of UserRepresentation:
[{
"id":"2b8f5030-d197-47f9-9b3b-631b2408fd7a",
"createdTimestamp":1623094859490,
"username":"admin",
"enabled":true,
"totp":false,
"emailVerified":false,
"firstName":"Admin",
"disableableCredentialTypes":[],
"requiredActions":[],
"notBefore":0,
"access":{
"manageGroupMembership":true,
"view":true,
"mapRoles":true,
"impersonate":true,
"manage":true
}
}]
I need for instance groups
to also be returned.
Any idea why this is happening?
xgp
June 14, 2021, 8:08pm
3
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
tania
November 14, 2023, 2:45pm
4
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!
xgp
November 14, 2023, 5:45pm
5
tania:
Is this one
Yes. Those idm
classes are the ones used by the API methods.
1 Like