# How can user x and a role to user y?

**URL:** <https://community.auth0.com/t/how-can-user-x-and-a-role-to-user-y/55335>\
**Category:** Get Help\
**Created:** [December 24, 2020, 7:53pm UTC](https://community.auth0.com/t/how-can-user-x-and-a-role-to-user-y/55335 "2020-12-24T19:53:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ibi/32/14946_2.png) [@ibi](https://community.auth0.com/u/ibi)\
**Post date:** [December 24, 2020, 7:53pm UTC](https://community.auth0.com/t/how-can-user-x-and-a-role-to-user-y/55335/1 "2020-12-24T19:53:19Z")

</div>

In my application, there are multiple roles. What is the best way to add following functionality?

After user y registrates as an employee, he needs to be added with a specific role.  
How can user x (the boss) assign a role to user y(the employee)  
What I thought, is that the boss has scope (assing:roles) and then he calls my custom api and I then call the management api from auth0. Is this the right way?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 28, 2020, 11:07pm UTC](https://community.auth0.com/t/how-can-user-x-and-a-role-to-user-y/55335/3 "2020-12-28T23:07:59Z")

</div>

Hi @ibi,

Yes, the way you describe makes sense. You just need to have a trusted client like a backend API that calls the management API.

You could also use a role for the boss, like an admin role for instance.

---

<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:** [January 21, 2021, 7:01pm UTC](https://community.auth0.com/t/how-can-user-x-and-a-role-to-user-y/55335/4 "2021-01-21T19:01:32Z")

</div>

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