# Retrieve user roles and permission on profile with nextjs

**URL:** <https://community.auth0.com/t/retrieve-user-roles-and-permission-on-profile-with-nextjs/92070>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [October 10, 2022, 12:30pm UTC](https://community.auth0.com/t/retrieve-user-roles-and-permission-on-profile-with-nextjs/92070 "2022-10-10T12:30:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![barekliton](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/barekliton/32/35778_2.png) [@barekliton](https://community.auth0.com/u/barekliton)\
**Post date:** [October 10, 2022, 12:30pm UTC](https://community.auth0.com/t/retrieve-user-roles-and-permission-on-profile-with-nextjs/92070/1 "2022-10-10T12:30:19Z")

</div>

Hi, i’m using  
@auth0/nextjs-auth0@^1.9.2

I added some roles and permission to the user but i cannot see those on user profile.

I get a JSON like this:

```auto
{
    "given_name": "XXX",
    "family_name": "XXX",
    "nickname": "XXXX",
    "name": "TEST",
    "picture": "https://lh3.googleusercontent.com/a/ALm5wu00F67aDunHRV9EdLjKN94LbOYW7E9LbPFWCtOE=s96-c",
    "locale": "it",
    "updated_at": "2022-10-10T06:56:02.203Z",
    "email": "xxxxxxxxx@gmail.com",
    "email_verified": true,
    "sub": "google-oauth2|10015xxxxxxxx23",
    "sid": "Yoxxxc-_-txxxxxxx7L"
}

```

How i can add those fields to the user i’m getting on the frontend?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [October 12, 2022, 12:17am UTC](https://community.auth0.com/t/retrieve-user-roles-and-permission-on-profile-with-nextjs/92070/3 "2022-10-12T00:17:58Z")

</div>

hey @barekliton welcome to the community!

You’ll need to explicitly add the roles to ID Tokens using an Action as outlined in the following FAQ:

[https://community.auth0.com/t/how-to-add-roles-and-permissions-to-the-id-token-using-actions/84506](https://community.auth0.com/t/how-to-add-roles-and-permissions-to-the-id-token-using-actions/84506)

Permissions are a bit different, and are typically kept within the context of an access token. I recommend taking a look at [RBAC](https://auth0.com/docs/manage-users/access-control/rbac) as this provides you with the option (assuming you have an API registered in Auth0) to automatically add permissions to user’s access tokens.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 26, 2022, 12:18am UTC](https://community.auth0.com/t/retrieve-user-roles-and-permission-on-profile-with-nextjs/92070/4 "2022-10-26T00:18:29Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
