# \#roles

**URL:** https://community.auth0.com/tag/roles/185.md

[Latest](https://community.auth0.com/latest.md) · [Categories](https://community.auth0.com/categories.md) · [Tags](https://community.auth0.com/tags.md)

---

## [Adding User to Role in Actions does not work](https://community.auth0.com/t/adding-user-to-role-in-actions-does-not-work/199448)

<div class="topic-metadata">

**Author:** [@armen.yeri](https://community.auth0.com/u/armen.yeri)\
**Replies:** 1\
**Last updated:** [April 29, 2026, 6:22pm UTC](https://community.auth0.com/t/adding-user-to-role-in-actions-does-not-work/199448 "2026-04-29T18:22:41Z")

</div>

None of the functions on existing blog posts work: TypeError: management.roles.assignUsers is not a function TypeError: management.users.assignRoles is not a function TypeError: management.users.assignRolesToUser is n…

---

## [Query on PAM (CyberArk) Integration with Auth0 for Privileged Access](https://community.auth0.com/t/query-on-pam-cyberark-integration-with-auth0-for-privileged-access/199362)

<div class="topic-metadata">

**Author:** [@ElangoMurugesan](https://community.auth0.com/u/ElangoMurugesan)\
**Replies:** 2\
**Last updated:** [April 28, 2026, 10:10pm UTC](https://community.auth0.com/t/query-on-pam-cyberark-integration-with-auth0-for-privileged-access/199362 "2026-04-28T22:10:29Z")

</div>

Hello Team, We are currently planning to implement a Privileged Access Management (PAM) solution for our Auth0 tenants, most likely using CyberArk. As part of this setup, we intend to: Manually create privileged use…

---

## [Assigning Users On Sign Up](https://community.auth0.com/t/assigning-users-on-sign-up/196002)

<div class="topic-metadata">

**Author:** [@tim.torpy](https://community.auth0.com/u/tim.torpy)\
**Replies:** 1\
**Last updated:** [January 7, 2026, 1:10pm UTC](https://community.auth0.com/t/assigning-users-on-sign-up/196002 "2026-01-07T13:10:57Z")

</div>

exports.onExecutePostLogin = async (event, api) =\> { // Check if the user has a role assigned if (event.authorization && event.authorization.roles && event.authorization.roles.length === 0) { const ManagementClient = …

---

## [Custom claims Auth0 B2B - Dependency on plan?](https://community.auth0.com/t/custom-claims-auth0-b2b-dependency-on-plan/191837)

<div class="topic-metadata">

**Author:** [@dublindatta](https://community.auth0.com/u/dublindatta)\
**Replies:** 1\
**Last updated:** [September 12, 2025, 5:47pm UTC](https://community.auth0.com/t/custom-claims-auth0-b2b-dependency-on-plan/191837 "2025-09-12T17:47:04Z")

</div>

What plans support custom claims for the access token (JWT)? Action post login looks good, but JWT does not contain the custom claims (free and Essentials plan). Is there a restrictions on custom claims based on a plan?

---

## [Organizations + Custom RBAC Roles](https://community.auth0.com/t/organizations-custom-rbac-roles/136436)

<div class="topic-metadata">

**Author:** [@larrybarry](https://community.auth0.com/u/larrybarry)\
**Replies:** 2\
**Last updated:** [July 31, 2025, 7:35pm UTC](https://community.auth0.com/t/organizations-custom-rbac-roles/136436 "2025-07-31T19:35:18Z")

</div>

Hi, what’s the best practice for organizations + custom RBAC roles? In Auth0, Roles seem to be a “global” concept. You query and list all roles. However, lots of platforms allow tenants/organizations to create their own…

---

## [Add Roles during Login for automatic migration](https://community.auth0.com/t/add-roles-during-login-for-automatic-migration/188406)

<div class="topic-metadata">

**Author:** [@andreas.h](https://community.auth0.com/u/andreas.h)\
**Replies:** 3\
**Last updated:** [June 26, 2025, 4:10pm UTC](https://community.auth0.com/t/add-roles-during-login-for-automatic-migration/188406 "2025-06-26T16:10:58Z")

</div>

I’m currently working on migrating users from both an on-premises database and an existing Auth0 connection. To do this, I’m using automatic migration via a custom database. The reason for moving users from the existing …

---

## [Cannot create a flow vault connection as the permission is not in my token](https://community.auth0.com/t/cannot-create-a-flow-vault-connection-as-the-permission-is-not-in-my-token/187889)

<div class="topic-metadata">

**Author:** [@davidedwards](https://community.auth0.com/u/davidedwards)\
**Replies:** 3\
**Last updated:** [June 12, 2025, 12:26pm UTC](https://community.auth0.com/t/cannot-create-a-flow-vault-connection-as-the-permission-is-not-in-my-token/187889 "2025-06-12T12:26:21Z")

</div>

So I am trying to use the management API to create a vault POST /flows/vault/connections However, the permission ‘create:flows\_vault\_connections’ is not in the access token so it fails! How else can I create a vault a…

---

## [Api/v2/users/{user}/permissions call not completing only sometimes](https://community.auth0.com/t/api-v2-users-user-permissions-call-not-completing-only-sometimes/185957)

<div class="topic-metadata">

**Author:** [@jharris](https://community.auth0.com/u/jharris)\
**Replies:** 2\
**Last updated:** [April 25, 2025, 6:12pm UTC](https://community.auth0.com/t/api-v2-users-user-permissions-call-not-completing-only-sometimes/185957 "2025-04-25T18:12:37Z")

</div>

UPDATE I have identified the issue is in the second Action, the UserId is not the Auth0 user id that the account is now linked to. Upon logging in the second time around, the user id is the Auth0 user account. Now I n…

---

## [Permissions in NextJS API](https://community.auth0.com/t/permissions-in-nextjs-api/185574)

<div class="topic-metadata">

**Author:** [@vt222\_rtyu](https://community.auth0.com/u/vt222_rtyu)\
**Replies:** 1\
**Last updated:** [April 16, 2025, 8:16pm UTC](https://community.auth0.com/t/permissions-in-nextjs-api/185574 "2025-04-16T20:16:40Z")

</div>

Hi there. I have a NextJS project, and due to some reasons, I’m implementing an API in this NextJS instead of some external app. I need to work with user permissions in this API endpoints, but am I even able to do that?…

---

## [Assign user role in login flow](https://community.auth0.com/t/assign-user-role-in-login-flow/185443)

<div class="topic-metadata">

**Author:** [@dpatrone1](https://community.auth0.com/u/dpatrone1)\
**Replies:** 1\
**Last updated:** [April 14, 2025, 6:45pm UTC](https://community.auth0.com/t/assign-user-role-in-login-flow/185443 "2025-04-14T18:45:36Z")

</div>

hi everyone, i have a auth0 automation to add a role to a user to the first login. with the new updates the row await management.assignRolestoUser(params, data); no logner works, i cannot find any info with my …

---

## [How do I attach the roles the user has assigned to the ID token using Actions?](https://community.auth0.com/t/how-do-i-attach-the-roles-the-user-has-assigned-to-the-id-token-using-actions/185418)

<div class="topic-metadata">

**Author:** [@jackiegleason](https://community.auth0.com/u/jackiegleason)\
**Replies:** 1\
**Last updated:** [April 14, 2025, 6:01pm UTC](https://community.auth0.com/t/how-do-i-attach-the-roles-the-user-has-assigned-to-the-id-token-using-actions/185418 "2025-04-14T18:01:44Z")

</div>

I am trying to add the roles the users have in the ID Token. All of the responses on here seem pretty old so they are all rule related. I tried this exports.onExecutePostLogin = async (event, api) =\> { if(event.auth…

---

## [Get a bearer token with user roles via the /oauth/token API](https://community.auth0.com/t/get-a-bearer-token-with-user-roles-via-the-oauth-token-api/185148)

<div class="topic-metadata">

**Author:** [@pdaj-atl](https://community.auth0.com/u/pdaj-atl)\
**Replies:** 4\
**Last updated:** [April 9, 2025, 5:13pm UTC](https://community.auth0.com/t/get-a-bearer-token-with-user-roles-via-the-oauth-token-api/185148 "2025-04-09T17:13:33Z")

</div>

My standard login process via the /authorize url is working fine and I have set it up to include user roles in the returned token with the following action: exports.onExecutePostLogin = async (event, api) =\> { const n…

---

## [How to include privileges in the ID token for conditional UI rendering?](https://community.auth0.com/t/how-to-include-privileges-in-the-id-token-for-conditional-ui-rendering/184972)

<div class="topic-metadata">

**Author:** [@moritz.meinhardt](https://community.auth0.com/u/moritz.meinhardt)\
**Replies:** 6\
**Last updated:** [April 7, 2025, 2:58pm UTC](https://community.auth0.com/t/how-to-include-privileges-in-the-id-token-for-conditional-ui-rendering/184972 "2025-04-07T14:58:15Z")

</div>

Hi there, In our UI, we want to render certain elements based on the user’s privileges. Using auth0 actions, I can add the user’s roles to the ID token (described here: , but not specific privileges. Is it intended th…

---

## [useUser only gets metadata updates after new user logs out and back in](https://community.auth0.com/t/useuser-only-gets-metadata-updates-after-new-user-logs-out-and-back-in/91091)

<div class="topic-metadata">

**Author:** [@steffanie](https://community.auth0.com/u/steffanie)\
**Replies:** 5\
**Last updated:** [February 18, 2025, 9:30pm UTC](https://community.auth0.com/t/useuser-only-gets-metadata-updates-after-new-user-logs-out-and-back-in/91091 "2025-02-18T21:30:05Z")

</div>

Continuing the discussion from NextJS useUser Not Getting App Metadata: I have a similar problem to the issue I’ve linked here. I have a postLogin action that sets some custom claims for a user, in order for us to read …

---

## [Permissions and roles with user token](https://community.auth0.com/t/permissions-and-roles-with-user-token/181331)

<div class="topic-metadata">

**Author:** [@kevin.schmitt.upjv](https://community.auth0.com/u/kevin.schmitt.upjv)\
**Replies:** 1\
**Last updated:** [February 4, 2025, 5:59pm UTC](https://community.auth0.com/t/permissions-and-roles-with-user-token/181331 "2025-02-04T17:59:32Z")

</div>

Hello all, A question please about roles and permissions. I have a routing api and I receive a token retrieved from a user after his connection with the auth0 form, this api will verify the token with the php verify sd…

---

## [False context deadline exceeded errors in Go management API](https://community.auth0.com/t/false-context-deadline-exceeded-errors-in-go-management-api/151896)

<div class="topic-metadata">

**Author:** [@Outbound5070](https://community.auth0.com/u/Outbound5070)\
**Replies:** 6\
**Last updated:** [November 28, 2024, 8:54pm UTC](https://community.auth0.com/t/false-context-deadline-exceeded-errors-in-go-management-api/151896 "2024-11-28T20:54:44Z")

</div>

I’m getting constant false context deadline exceeded errors in the User.Roles function in the Go management API. It receives a context with a 30 second timeout. And it frequently throws the following error: failed to s…

---

## [Auth0 4.10.0, NodeJS, and the impossible ManagementClient](https://community.auth0.com/t/auth0-4-10-0-nodejs-and-the-impossible-managementclient/150001)

<div class="topic-metadata">

**Author:** [@cubap](https://community.auth0.com/u/cubap)\
**Replies:** 1\
**Last updated:** [October 17, 2024, 10:45am UTC](https://community.auth0.com/t/auth0-4-10-0-nodejs-and-the-impossible-managementclient/150001 "2024-10-17T10:45:26Z")

</div>

I’ve been in a battle with on-site AI, who keeps giving me broken code. I am frustrated by the changes to the ManagementClient for NodeJS which seems to have removed a lot of functionality or forced it into direct API ca…

---

## [How to retrieve roles and user list with 700 roles and 2000-5000 users (Management API)](https://community.auth0.com/t/how-to-retrieve-roles-and-user-list-with-700-roles-and-2000-5000-users-management-api/138153)

<div class="topic-metadata">

**Author:** [@lukaselmer](https://community.auth0.com/u/lukaselmer)\
**Replies:** 2\
**Last updated:** [July 17, 2024, 11:34am UTC](https://community.auth0.com/t/how-to-retrieve-roles-and-user-list-with-700-roles-and-2000-5000-users-management-api/138153 "2024-07-17T11:34:23Z")

</div>

Hi, We are building a UI where our users can assign and remove specific roles from existing users, if they have the respective roles / permissions to do so. For this, we need to get a list of all users with their respec…

---

## [Help, Managnment API, set role for a user report 400 error](https://community.auth0.com/t/help-managnment-api-set-role-for-a-user-report-400-error/136827)

<div class="topic-metadata">

**Author:** [@george.huang](https://community.auth0.com/u/george.huang)\
**Replies:** 3\
**Last updated:** [June 21, 2024, 10:17pm UTC](https://community.auth0.com/t/help-managnment-api-set-role-for-a-user-report-400-error/136827 "2024-06-21T22:17:11Z")

</div>

New to Auth0, try to use management API to set role for a user, GET works fine , but POST not , Anyone can see what I did wrong in the code below? Thanks (user\_id=‘auth0|65e738267a1c972e29248c8c’) import…

---

## [I am unable to add the role which was added during the first login to the access token](https://community.auth0.com/t/i-am-unable-to-add-the-role-which-was-added-during-the-first-login-to-the-access-token/112270)

<div class="topic-metadata">

**Author:** [@shester](https://community.auth0.com/u/shester)\
**Replies:** 2\
**Last updated:** [June 12, 2024, 2:00pm UTC](https://community.auth0.com/t/i-am-unable-to-add-the-role-which-was-added-during-the-first-login-to-the-access-token/112270 "2024-06-12T14:00:05Z")

</div>

I have the following actions in my Login flow: Assign Role On First Login: exports.onExecutePostLogin = async (event, api) =\> { if (event.stats.logins\_count !== 1) { return; } const ManagementClient = requi…

---

## [Getting Roles as null while calling GetAllMembersAsync According to organization](https://community.auth0.com/t/getting-roles-as-null-while-calling-getallmembersasync-according-to-organization/135277)

<div class="topic-metadata">

**Author:** [@amit.raj](https://community.auth0.com/u/amit.raj)\
**Replies:** 1\
**Last updated:** [May 31, 2024, 7:36pm UTC](https://community.auth0.com/t/getting-roles-as-null-while-calling-getallmembersasync-according-to-organization/135277 "2024-05-31T19:36:36Z")

</div>

And is there is any option by which i can activate or deactivate my organizational users.

---

## [Node-sdk; Management Client; FetchError: The request failed and the interceptors did not return an alternative response](https://community.auth0.com/t/node-sdk-management-client-fetcherror-the-request-failed-and-the-interceptors-did-not-return-an-alternative-response/132714)

<div class="topic-metadata">

**Author:** [@rhuber](https://community.auth0.com/u/rhuber)\
**Replies:** 3\
**Last updated:** [May 8, 2024, 1:19am UTC](https://community.auth0.com/t/node-sdk-management-client-fetcherror-the-request-failed-and-the-interceptors-did-not-return-an-alternative-response/132714 "2024-05-08T01:19:43Z")

</div>

There are some methods from the Management Client failing and returning this error: FetchError: The request failed and the interceptors did not return an alternative response at BaseAPI.fetch (/.../api/node\_modules/…

---

## [Getting user roles from user\_id](https://community.auth0.com/t/getting-user-roles-from-user-id/132756)

<div class="topic-metadata">

**Author:** [@davidplane](https://community.auth0.com/u/davidplane)\
**Replies:** 1\
**Last updated:** [April 25, 2024, 6:20pm UTC](https://community.auth0.com/t/getting-user-roles-from-user-id/132756 "2024-04-25T18:20:28Z")

</div>

Using just the above user\_id retrieved from the session token, is it possible to get the roles of the user? I’m already above to retrieve roles from the session token, but not sure how to do it in the backend with onl…

---

## [Best Practices for Logging Role Management Actions (Create, Edit, Delete)](https://community.auth0.com/t/best-practices-for-logging-role-management-actions-create-edit-delete/131382)

<div class="topic-metadata">

**Author:** [@danysik89](https://community.auth0.com/u/danysik89)\
**Replies:** 1\
**Last updated:** [April 5, 2024, 11:53pm UTC](https://community.auth0.com/t/best-practices-for-logging-role-management-actions-create-edit-delete/131382 "2024-04-05T23:53:02Z")

</div>

Hello Auth0 Community, I’m currently developing an application using Auth0 for authentication and authorization, and I’ve encountered a need to log administrative actions related to role management, specifically: Role…

---

## [Role Permissions in Blazor Server App](https://community.auth0.com/t/role-permissions-in-blazor-server-app/129446)

<div class="topic-metadata">

**Author:** [@olivier.vanheste](https://community.auth0.com/u/olivier.vanheste)\
**Replies:** 3\
**Last updated:** [March 12, 2024, 3:46pm UTC](https://community.auth0.com/t/role-permissions-in-blazor-server-app/129446 "2024-03-12T15:46:43Z")

</div>

Hi, I’m new to Auth0 and I’ve been playing around with it and so far everything works as expected. However I have a problem that I couldn’t find a straight answer too and I don’t know if this is at all possible. I have…

---

## [How can I get user roles client side?](https://community.auth0.com/t/how-can-i-get-user-roles-client-side/127863)

<div class="topic-metadata">

**Author:** [@luke2](https://community.auth0.com/u/luke2)\
**Replies:** 3\
**Last updated:** [February 26, 2024, 8:19pm UTC](https://community.auth0.com/t/how-can-i-get-user-roles-client-side/127863 "2024-02-26T20:19:13Z")

</div>

Hi, I’m new to using Auth0 sos still trying to get an understanding of how things work. What i’m wanting to do is conditional checks client-side which will show/hide certain content depending on authenticated user roles…

---

## [Questions about "Scopes per API" limit](https://community.auth0.com/t/questions-about-scopes-per-api-limit/127847)

<div class="topic-metadata">

**Author:** [@samkit](https://community.auth0.com/u/samkit)\
**Replies:** 3\
**Last updated:** [February 23, 2024, 12:44am UTC](https://community.auth0.com/t/questions-about-scopes-per-api-limit/127847 "2024-02-23T00:44:14Z")

</div>

Trying to confirm my understanding about entity limits Scopes per API - 1000 : This is for the requested scopes from an audience and not about total number of scopes/permissions that can be defined for an API, is that …

---

## [Not getting roles](https://community.auth0.com/t/not-getting-roles/127184)

<div class="topic-metadata">

**Author:** [@pankaj.y](https://community.auth0.com/u/pankaj.y)\
**Replies:** 1\
**Last updated:** [February 13, 2024, 1:36pm UTC](https://community.auth0.com/t/not-getting-roles/127184 "2024-02-13T13:36:06Z")

</div>

When i’m trying to get user roles in access token it does not work for me what i’m doing wrong can anyone help me to figure out1 This is my action code exports.onExecutePostLogin = async (event, api) =\> { const Ma…

---

## [Universal login doesn't work with post-login action in React](https://community.auth0.com/t/universal-login-doesnt-work-with-post-login-action-in-react/125429)

<div class="topic-metadata">

**Author:** [@pemikdev](https://community.auth0.com/u/pemikdev)\
**Replies:** 1\
**Last updated:** [January 23, 2024, 9:26pm UTC](https://community.auth0.com/t/universal-login-doesnt-work-with-post-login-action-in-react/125429 "2024-01-23T21:26:49Z")

</div>

Hi, we have a React (Typescript) application with Universal Login. The user login works perfectly. But we would like to assign roles to user on first login. We followed this video: https://www.youtube.com/watch?v=B5pzp…

---

## [Best Practices for Retrieving User Permissions in a SPA (Vue.js) with Node.js API using Auth0](https://community.auth0.com/t/best-practices-for-retrieving-user-permissions-in-a-spa-vue-js-with-node-js-api-using-auth0/122017)

<div class="topic-metadata">

**Author:** [@viniciusteixeiradias](https://community.auth0.com/u/viniciusteixeiradias)\
**Replies:** 5\
**Last updated:** [December 14, 2023, 1:26am UTC](https://community.auth0.com/t/best-practices-for-retrieving-user-permissions-in-a-spa-vue-js-with-node-js-api-using-auth0/122017 "2023-12-14T01:26:54Z")

</div>

I am developing a Single Page Application (SPA) using Vue.js with a Node.js API, where I am utilizing Auth0 for authentication and access control. However, I have encountered challenges in obtaining user permissions on t…

[Next page](https://community.auth0.com/tag/roles/185.md?match_all_tags=true&page=1&tags%5B%5D=roles)
