Expose more than the name of the role in the context event

Feature / Description: Provide a short title of your feature request/feedback.
In an action, you can access and add roles as custom claims. This seems (according to the forum) like a popular use case for using both actions and custom claims. Problem is, the available context event contains roles, but the roles is an string array containing only the name of the roles.

As these names can change (from the Auth0 GUI), it’s not exactly ideal to use them as identifiers. The context event should expose all data on the role entity, or at least the id, so we can safely use it

If you need more background, code examples, screenshots or whatever, let me know.

Use-case: Tell us what you are building. How would the feedback/feature improve your experience?
I have a SPA, and I use the roles to handle permissions in the GUI. If I where to use the role name, the app would break if someone changed the role names.

Thank you for creating this feedback card!

1 Like

@konrad.sopala What are the chances of this being implemented in near future?

As with all product feedback and feature requests it’s a matter of how many people voted / advocated / created feedback card for specific improvements / feature addition. As community engineers we’re making sure to rely all your feedback to appropriate team and advocate for it but it’s product team decision to decide which feature they want to implement in current implementation cycle.

If featureA has more feedback that featureB then the first one gonna be implemented unless there are more let’s say enterprise clients who are voting for the second one.

As of now for this exact feature it’s doing good and gradually getting more and more traction!

Ok, thanks. I’ll soon need to make a decision on whether to use Auth0 or not, so it’s good to know that we can not know if this will be implemented.

Totally understand it! I’ll let you know as soon as I know something!

So we decided to move on to another service, but I’ll leave this open.

1 Like

What’s the latest on this? I’ve come across a similar need of having the role id and not just the role name.

1 Like

Same here, we rely on the role id and it’s looking like we’re going to need to make Management API calls from within actions or add a hard-coded mapping, neither of which is ideal

4 Likes

This is also something that we are looking to have. Currently we don’t have a great way to merge existing roles with new ones being added as part of an action, and we’d like to avoid blindly re-assigning the same set of roles and hitting the MGMT API more than we need to