Auth0 Home Blog Docs

How to get user's role on server side (API)



I am setting user roles in Rules.
I wish then to check that the user holds the correct role (admin) in order to allow certain actions.
How can I check that on a node (express.js) API?


If you have stored the roles as part of the user profile data, you can access it by requesting the user profile, or from the id_token of the user.

Here is a quick start for the node.