# Adding role to new user with email domain IF email is verified

**URL:** <https://community.auth0.com/t/adding-role-to-new-user-with-email-domain-if-email-is-verified/87957>\
**Category:** Get Help\
**Tags:** actions, email-verification, login, roles\
**Created:** [August 1, 2022, 10:52am UTC](https://community.auth0.com/t/adding-role-to-new-user-with-email-domain-if-email-is-verified/87957 "2022-08-01T10:52:06Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 9, 2022, 4:03pm UTC](https://community.auth0.com/t/adding-role-to-new-user-with-email-domain-if-email-is-verified/87957/8 "2022-09-09T16:03:06Z")

</div>

Hi @daniel.j,

Thanks for your response.

> [@daniel.j](#):
>
> > The Post-User Registration extensibility point is available for database connections. To learn more, see [Database Connections](https://auth0.com/docs/connections/database).
> 
> and the fact that I am using Google Login in between others?

Firstly, a Database or Social Connection will work with a Post-Login Action. Moreover, the examples shown in [this link](https://community.auth0.com/t/how-to-add-roles-and-permissions-to-the-id-token-using-actions/84506) and [my previous post](https://community.auth0.com/t/adding-role-to-new-user-with-email-domain-if-email-is-verified/87957/3) are a Post Login Action. I am not seeing where a Post-User Reg is involved.

In this sittuation, you will need to toggle off the feature that **Adds permissions in the Access Token** and create a Post-Login Action to add the user’s permissions and roles to the token. This will avoid doubly adding the permissions and roles if you previously had the **Adds permissions in the Access Token** toggle enabled. See below for clarity:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/0/d/0d305932f3172d3c6d0b04ed255af2b8574852d7.png)

> [@daniel.j](#):
>
> I do know I could do it this way, but what I am after is getting the permissions into the top level permissions field.

You will not be able to populate the permissions array in the access token unless the user was previously assigned permissions before granting the access token, or you will need to [configure silent authentication](https://auth0.com/docs/authenticate/login/configure-silent-authentication) to request a new access token with the newly populated permissions.

I would recommend the former, where you add the permissions/scopes as a custom claim to the access tokens before granting the access token.

Please let me know how this goes for you. If you need further assistance on getting the Action working, please feel free to reach out.

Thank you.

---

_[View the full topic](https://community.auth0.com/t/adding-role-to-new-user-with-email-domain-if-email-is-verified/87957)._
