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

**URL:** <https://forum.keycloak.org/t/admin-realms-admin-users-does-not-return-userrepresentation/9536>\
**Category:** Getting advice\
**Tags:** admin-console\
**Created:** [June 11, 2021, 8:44am UTC](https://forum.keycloak.org/t/admin-realms-admin-users-does-not-return-userrepresentation/9536 "2021-06-11T08:44:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![WernerRaath](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/wernerraath/32/3335_2.png) [@WernerRaath](https://forum.keycloak.org/u/WernerRaath)\
**Post date:** [June 11, 2021, 8:44am UTC](https://forum.keycloak.org/t/admin-realms-admin-users-does-not-return-userrepresentation/9536/1 "2021-06-11T08:44:53Z")

</div>

When doing a GET to [/admin/realms/admin/users](https://www.keycloak.org/docs-api/13.0/rest-api/index.html#_getusers), I get a slim version of UserRepresentation:

```auto
[{
   "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?

---

<div class="post-metadata">

**Author:** ![WernerRaath](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/wernerraath/32/3335_2.png) [@WernerRaath](https://forum.keycloak.org/u/WernerRaath)\
**Post date:** [June 14, 2021, 8:36am UTC](https://forum.keycloak.org/t/admin-realms-admin-users-does-not-return-userrepresentation/9536/2 "2021-06-14T08:36:11Z")

</div>

Anyone with any ideas?

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [June 14, 2021, 8:08pm UTC](https://forum.keycloak.org/t/admin-realms-admin-users-does-not-return-userrepresentation/9536/3 "2021-06-14T20:08:43Z")

</div>

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](https://www.keycloak.org/docs-api/13.0/rest-api/index.html#_groupmembership)

---

<div class="post-metadata">

**Author:** ![tania](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/tania/32/9460_2.png) [@tania](https://forum.keycloak.org/u/tania)\
**Post date:** [November 14, 2023, 2:45pm UTC](https://forum.keycloak.org/t/admin-realms-admin-users-does-not-return-userrepresentation/9536/4 "2023-11-14T14:45:46Z")

</div>

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](https://github.com/keycloak/keycloak/blob/main/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java)?

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [November 14, 2023, 5:45pm UTC](https://forum.keycloak.org/t/admin-realms-admin-users-does-not-return-userrepresentation/9536/5 "2023-11-14T17:45:20Z")

</div>

> [@tania](#):
>
> Is this one

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

---

<div class="post-metadata">

**Author:** ![AyushTi](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@AyushTi](https://forum.keycloak.org/u/AyushTi)\
**Post date:** [March 21, 2025, 11:57am UTC](https://forum.keycloak.org/t/admin-realms-admin-users-does-not-return-userrepresentation/9536/6 "2025-03-21T11:57:49Z")

</div>

As much i have found about this in the latest docs and code of keycloak.We may use something called the BreifRepresentation key to actually get the all the details. here is the image

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/3/3fa6d324b848e34aa279feb0988e081bb4ac30a2.png)  
It is passed as the query parameter as well. here is the link of the docs as well.

> **[Keycloak Admin REST API](https://www.keycloak.org/docs-api/latest/rest-api/index.html)**

Hope it helps.
