[keycloak-user] Get user's roles from groups using POST

Eric Matte eric.matte at bionxinternational.com
Thu Sep 8 14:30:34 EDT 2016


Hi, I need to get all user roles from a specified user ID from all assigned groups for this particular user.
I have searched into the API documentation and found no link that could returns me all roles of the authenticated user.

Currently, I have the user id, the realm name, the client id, and an admin token.
I need to send a POST method from my backend in order for it the properly set all the session's variables.

http://www.keycloak.org/docs/rest-api/#_userrepresentation<http://www.keycloak.org/docs/rest-api/%23_userrepresentation>
>From this link, UserRepresentation seems to have everything I need, but while checking the code on GitHub, the function for "GET /admin/realms/{realm}/users/{id}" only returns the few first variables (name, email, id, etc.). But, clientRoles, for instance, is not returned.

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160908/a9041425/attachment.html 


More information about the keycloak-user mailing list