# 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:** 5

<div class="post-metadata">

**Author:** ![daniel.j](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daniel.j/32/39769_2.png) [@daniel.j](https://community.auth0.com/u/daniel.j)\
**Post date:** [September 8, 2022, 10:11am UTC](https://community.auth0.com/t/adding-role-to-new-user-with-email-domain-if-email-is-verified/87957/5 "2022-09-08T10:11:39Z")

</div>

> [@rueben.tiow](#):
>
> Because we are using a Post-Login Action script and would like to only assign the user role once, we should include a user\_metdata check for a single execution. Here is an example:
> 
> ```auto
> 
> ```

I have a question regarding this. I am doing something similar, but at the same time use the role / permission embedding in the token. How can I refresh the token the auth0 will send to client after I have assigned the new role?

My whole flow is described here → [How to refresh the token after merging user & assigning role?](https://community.auth0.com/t/how-to-refresh-the-token-after-merging-user-assigning-role/90143)

---

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