I'm wanting to get all users that have a particular permission.
I've been playing around with the POST /api/v2/users/search endpoint but can't find a way to filter by permission.
Being that permissions are inherited by roles, it might not be possible. But wondering if there are any creative solutions to get these users, without the need to retrieve ALL users and then check if they have the license in another API request. Getting all users is not workable because some accounts have tens of thousands of users, with only a few of them having the license.
It is indeed not possible to use POST /api/v2/users/search endpoint with a filter on permission.
What I can think of would be to impose that the permission is assigned to the users via a specific/pre-determined role if taht's acceptable (creating a new role with this permission or adding the permission to a specific existing role) and to retrieve users with GET /api/v2/authorization/roles/{roleId}/users
You could also perform a check on the role itself to make sure that the permission is indeed enabled in that role with GET /api/v2/authorization/roles/{roleId}
While not possible today, this is a use case that I would like to support in the platform. Could you please vote for this idea I've created in the ideas portal? Thank you!