Get organization role's users

API endpoint to get all members associated with one role in the organization

It would be useful to have one API endpoint that returns all organization members that have a specific role, just like endpoint /api/v2/roles/{id}/users but in the context of the organization.

The use case is that we want to have a table with all organization members and their data and it would be very useful to have displayed user roles that we can get with one API request instead of sending one API request for one user.

Hi @vladimir.bulatovic,

Thanks for creating this feature request!

Hi we’re running into a similar issue with a similar use case for this particular endpoint/feature. I see that something similar has been brought up before.

I think possibly even adding a roles attribute to the /api/v2/organizations/{id}/members would be super helpful. The current work around is to request member roles for each member which isn’t scalable as member sizes begin to grow.

4 Likes

Plus 1 for this, ideally it would also be added as an attribute on /api/v2/users.

I’m not using organisations currently but my usecase is similar of wanting to display a table of users on a per connection basis with the user’s role as one of the table columns.

The current best workaround I’ve found is to first query for all roles with /api/v2/roles then call /api/v2/roles/{id}/user for each role since you can at least get 100 users per api call that way with pagination. This is awkward though as you then need to manually filter out the users which aren’t from the connection you’re interested in. It also makes it really easy to accidentally fall foul of the rate limiting on the management api.

4 Likes

We also have a need for this feature. We use the organizations features (a lot) and love it so far. However, we frequently find limitations that are covered by the normal APIs (/users, /roles, etc) but are not carried over with support to organizations.

If we weren’t using organizations then we could use the /roles/{id}/users endpoint to get a list of users in a particular role. But with organizations, we have to first call /organizations/:id/members then iterate over each member with an additional call to /organizations/{id}/members/{user_id}/roles (yikes).

It’d be really great to have this functionality carried over in to the realm of organization endpoints! Cheers

3 Likes

Thanks for the feedback @btp-john.strickler and welcome to the community, makes sense to me!

1 Like

I agree with all the aboves, roles should be passed as part of the user properties. Having to go fetch it individually is inconvenient.

1 Like

Hi :slight_smile: Is there any update on this? We would also love to have this as its rather painful having to loop individually

1 Like

Hi, are there any updates on this? It is unrealistic for our application to loop over every user and really need this feature if we’re going to utilize auth0 and organizations.

Hey there!

We are reviewing those Feedback topics on a monthly basis and will be performing another round in a few days. Compared to other feature requests it wasn’t receiving enough votes that’s why we’ve been taking into account topics that received more votes. Will let you know once we have any communication on that front!

1 Like

Hi Konrad, thank you for the update. Looking forward to hearing more!

1 Like

Hi @konrad.sopala, is there any update regarding this feature request?