1 year ago

#386711

test-img

Peer Maute

How to get all permissions of a specific user in Keycloak as an admin over an API

I am trying to get all permissions of a user with an admin account.

If I get an access token for my user and use this endpoint:

POST 'https://<HOST>/auth/realms/<REALM>/protocol/openid-connect/token'

with this header/body:

--header 'Authorization: Bearer <ACCESS_TOKEN_OF_USER>'
--header 'Content-Type: application/x-www-form-urlencoded' \\
--data-urlencode 'audience=<CLIENT>' \\
--data-urlencode 'grant_type=urn:ietf:params:oauth:grant-type:uma-ticket'

I get a new token with all the information I need (including permissions for resources and their scopes).

Now I want to get all these information without knowing the credentials of the user but with those of the admin. In the admin console you get access to all these information as an admin. So I guess, it should be possible to evaluate all permissions of a specific user with just the admin access. But what request/requests do I have to do?

(I am using Keycloak 17-Wildfly)

api

permissions

authorization

keycloak

0 Answers

Your Answer

Accepted video resources