Search Users with Permission

Hi,

I’m just wondering if it is possible to search users that have a specific permission (or set of permissions) using the GET /users endpoint. From what I can see, the management API doesn’t support it as it doesn’t exist as a valid query filter. There’s a different endpoint for fetching a role’s users roles/{id}/users/ which is helpful, but then we lose out on the search filter capabilities that we get in GET /users which I need.

I came across this thread where someone posted pretty much the same question. The proposed answer was to “sync” user permissions to app_metadata. I understand that we can utilize the app_metadata property as part of the user search criteria, but I’m not super sure how to sync users’ permissions to the app_metadata property.

Does anyone have any suggestions/tips?

1 Like

Hi @jvivanco

We have a simple endpoint on the server, where a user can have his permissions/roles updated. Then we just make sure to update the app metadata with this information, so it’s available for searching.

Maybe the new hooks can provide a way of extending Auth0 to sync this information?