I’m calling the admin api to get the list of users for a realm. I need the groups field (which is defined in the UserRepresentation) however, is not returned by the api. Calling the user details endpoint for a specific user also misses this field.
These are the fields I’m getting:
{'id': '314cfd91-dae1-40c1-9af9-5857c6531dc3',
'createdTimestamp': 1600373234948,
'username': 'jeudy@x.io',
'enabled': True,
'totp': False,
'emailVerified': True,
'firstName': 'Jeudy',
'lastName': 'Blanco',
'email': 'jeudy@x.io',
'disableableCredentialTypes': [],
'requiredActions': [],
'notBefore': 0,
'access': {'manageGroupMembership': True,
'view': True,
'mapRoles': True,
'impersonate': True,
'manage': True}}
I know I can get the groups with a mapper in the access token, but I need them from the api call.
Is this possible at all? or do I need to cross reference the list of users with the /{realm}/groups/{id}/members
endpoint?