Get organization members and their roles in Management API

Hey team,

I am trying to use the management api to get a list of members of an organization together with their roles. What is the best way to get this information.

I can easily list members of an organization but it seems like then I need to request the organization role for each member using Auth0 Docs: API

Auth0 can’t want me to make a separate call for each organization member in order to get their role. What am I missing?

1 Like

Hi @johannes.degn,

Welcome to the Auth0 Community!

Hi @johannes.degn,

Welcome to the Auth0 Community!

Yes, that is correct! If you need to get a list of Organization members and their roles, you first need to make a call to the Management API’s Get members who belong to an organization endpoint to obtain the list of Organization Members. Then, for each user, you can call the Management API’s Get a user’s roles endpoint.

I understand that this may not be the most efficient way to retrieve an organization member’s role, but currently, there isn’t a dedicated endpoint to do this.

If you have a moment, please take a second to upvote on the Get organization role's users feedback request. We are always reviewing our feedback requests and prioritizing them based on the number of votes they receive.

Please let me know if there is anything else I can help you with.

Thanks,
Rueben

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