Include roles in /api/v2/users?

Is it possible to include roles in the /api/v2/users resource? I’d like to be able to query for users, and have their roles attached.

I know that there are other resources such as /api/v2/roles, but that would require multiple queries, and one for each user. This isn’t scalable, so I’m curious if it’s possible to retrieve all users with their respective roles?

2 Likes

Hello!

Unfortunately, this is something unsupported.

You can recommend this as a feature on https://auth0.com/feedback

We always appreciate our customer’s feedback.

Thank you!

2 Likes

Not sure if this helps, but I had a similar question and came up with a solution using Rules: