# Can i change user roles Auth0 from my Web App using SDK or API?

**URL:** <https://community.auth0.com/t/can-i-change-user-roles-auth0-from-my-web-app-using-sdk-or-api/40416>\
**Category:** Get Help\
**Created:** [April 2, 2020, 6:40pm UTC](https://community.auth0.com/t/can-i-change-user-roles-auth0-from-my-web-app-using-sdk-or-api/40416 "2020-04-02T18:40:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![orozcox](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/orozcox/32/12746_2.png) [@orozcox](https://community.auth0.com/u/orozcox)\
**Post date:** [April 2, 2020, 6:40pm UTC](https://community.auth0.com/t/can-i-change-user-roles-auth0-from-my-web-app-using-sdk-or-api/40416/1 "2020-04-02T18:40:29Z")

</div>

Hello. I am developing two Angular web applications (Web Site and Admin Web Site) for a client and i would like to know if i can set or change Auth0 user roles from this application using some SDK or API.

One use case is this: One user creates one account using the web site and make a request to upgrade his user from regular user to student user. Then one administrator using the Admin Web site receive the request and pressing a button he makes the change . That button must to connect to auth0 to change the role of that user. Is this possible? How could i do this?

Thanks a los for your help.

---

<div class="post-metadata">

**Author:** ![kstrongholte](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kstrongholte/32/16354_2.png) [@kstrongholte](https://community.auth0.com/u/kstrongholte)\
**Post date:** [April 3, 2020, 4:51pm UTC](https://community.auth0.com/t/can-i-change-user-roles-auth0-from-my-web-app-using-sdk-or-api/40416/3 "2020-04-03T16:51:44Z")

</div>

Hi @orozcox, welcome to the Auth0 community!

Have you tried using the [Assign roles to a user](https://auth0.com/docs/api/management/v2/#!/Users/post_user_roles) endpoint of the Management API?

---

<div class="post-metadata">

**Author:** ![orozcox](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/orozcox/32/12746_2.png) [@orozcox](https://community.auth0.com/u/orozcox)\
**Post date:** [April 3, 2020, 8:00pm UTC](https://community.auth0.com/t/can-i-change-user-roles-auth0-from-my-web-app-using-sdk-or-api/40416/4 "2020-04-03T20:00:03Z")

</div>

Thanks, i tried and it works!  
Now, i would like to know how to recover the roles of the user during the authentication:  
Is it possible to load them in the token?  
Can i add a role to the user during the authentication process?

---

<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:** [April 18, 2020, 8:00pm UTC](https://community.auth0.com/t/can-i-change-user-roles-auth0-from-my-web-app-using-sdk-or-api/40416/5 "2020-04-18T20:00:03Z")

</div>

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