You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a way to get all mapped attributes for all groups/roles in one API request?
#24377
Hi, so in Keycloak we have an API request GET /{realm}/users, where for all users we are getting attributes field, which have all LDAP attributes according to user-attribute-ldap-mapper mappers.
For groups we also have group-ldap-mapper mapper and API request GET /{realm}/groups, which gives only name mapped to LDAP attribute as it set in "Group Name LDAP Attribute" setting. But to get all attributes for all groups, we have to call GET /{realm}/groups/{id} for every single existing group, which can be many, many requests.
So, is there a way to optimize this and get all attributes for all groups in single API request, like for users?
and even though this user is in a group with the mailcow_template attribute set on the group that contains the user, it's not being set on the user itself even when I pass &briefRepresentation=False in the querystring
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi, so in Keycloak we have an API request
GET /{realm}/users, where for all users we are gettingattributesfield, which have all LDAP attributes according touser-attribute-ldap-mappermappers.For groups we also have
group-ldap-mappermapper and API requestGET /{realm}/groups, which gives only name mapped to LDAP attribute as it set in "Group Name LDAP Attribute" setting. But to get all attributes for all groups, we have to callGET /{realm}/groups/{id}for every single existing group, which can be many, many requests.So, is there a way to optimize this and get all attributes for all groups in single API request, like for users?
All reactions
Replies: 2 comments
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Include
{"briefRepresentation": False}in the query parameters, then the result will include attributes.All reactions
Uh oh!
There was an error while loading. Please reload this page.
@PBAsydney
briefRepresentationisn't working for me and has a lot of confusion surrounding it it seems, and not much documentation to boot.I have a user here, returned by the
/usersapi endpoint:and even though this user is in a group with the
mailcow_templateattribute set on the group that contains the user, it's not being set on the user itself even when I pass&briefRepresentation=Falsein the querystringAll reactions