Repository navigation
Admin API: filter users by group #19802
Unanswered
luciano-fiandesio
asked this question in
Q&A
Replies: 1 comment
|
With the provided Java Admin API you'd use the GroupResource. I've used the similar RoleResource before and usage looks something like: If you ultimately do not want to use the Java Admin API, you can probably watch the HTTP requests it makes to determine how to manually construct a REST query, or refer to the docs, which indicate the format is: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello, I'm using the
/adminAPIs to fetch and manage users for a Realm.I'm using Polices to allow specific users to access the
/usersendpoint.Now, I would like to filter the users returning from the API by group: to be precise, the filter should match the user executing the request's group with the users' group. If the caller belongs to group
group-1, only users belonging togroup-1should return from the/admin/realms/[realm]/usersendpoint.I thought that I could use a Policy for the filtering (since policies should support ABAC), but I could not find a good example - my understanding is that for these kinds of use cases, I should use a JS policy, but it is not clear to me how these are created.
What would be the correct approach to achieve user filtering at the admin API level?
Thanks!
Version: keycloak-21.0.1 with
--features=admin-fine-grained-authzflagAll reactions