How can I retrieve Users based on a permission?

Hello,

Is it possible for me to get a list of users based on “permission”?
Is there any API for that?

Thank you

Hi @henry9x

There is currently no API to retrieve users by permission. The only available API is to get all users associated with a role:
GET /api/v2/roles/{id}/users

You might need to iterate over all the roles with GET /api/v2/roles, check which ones have the permission you’re looking for with GET /api/v2/roles/{id}/permissions and then retrieve the users within those roles with
GET /api/v2/roles/{id}/users
.

2 Likes

Thanks for sharing that solution Ricardo!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.