Hello everyone,
I am currently implementing a system where an admin of an Auth0 Organization needs to retrieve the list of members in their organization. However, I want to avoid using the Management API because it requires a Machine-to-Machine (M2M) token, which in turn requires storing and exposing a client_secret
—something I want to avoid for security reasons.
My Setup:
- I have Organizations enabled in my Auth0 tenant.
- I can successfully authenticate as an admin and obtain an access_token with my organization.
- I would like to retrieve the list of users that belong to my organization using only the access_token of an authenticated admin.
Key Questions:
- Is there any alternative way for an admin to retrieve only the users of their own organization without requiring the Management API?
- Can the
access_token
issued to an authenticated admin include a scope or permission that allows fetching the organization’s users? - If this is not possible directly, what is the recommended approach to securely expose this information without requiring a backend service that holds a
client_secret
? - Would it be possible to leverage ID tokens, user metadata, or custom claims to achieve this?
I appreciate any insights, best practices, or workarounds that the community can suggest. Thanks in advance!