I am trying to write a rule that validates that the user has a particular permission, with the necessary permission derived from an aspect of the client metadata.
My problem is I can’t seem to find a way to get at the user permissions.
In context.authorization.roles I can see the roles that have been assigned to the user, but not the permissions derived from those roles.
I turned on “Add Permissions in the Access Token” just in case but that doesn’t seem to relate to this.
I’d expect there to be something similar to the output from the https://auth0.com/docs/api/management/v2#!/Users/get_permissions API response, with all the permissions the user has across any roles they have been assigned.
Any guidance you can give me on this would be really appreciated (even if it’s to say I’m approaching this in completely the wrong way).