Return all users with client role
Description
Hi everyone,
I want to use adminClient.clients.findUsersWithRole() to get all users that have a particular client role. However, I can only get the users to whom the role has been directly attached. I can not get users that inherit the role by being in a specific group that has this client role attached.
My workaround is to query all groups with the role attached with something like:
public findGroupsWithRole = this.makeRequest<{ id: string; roleName: string; first?: number; max?: number },
GroupRepresentation[]>({
method: 'GET',
path: '/{id}/roles/{roleName}/groups',
urlParamKeys: ['id', 'roleName'],
});
and then list all the members... or am I missing something here to get all the users with a particular client role?
Best regards and keep up the good work! Dominik
Discussion
No response
Motivation
No response
Details
No response
As far as I am aware this API endpoint does not exist. If it does exist you should be able to find it in the Admin API documentation. If you want to request a new functionality in the API itself feel free to open up an issue on the main repository where this code resides.