# Limit user's Role to max of x

**URL:** <https://community.auth0.com/t/limit-users-role-to-max-of-x/66373>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [July 19, 2021, 10:36am UTC](https://community.auth0.com/t/limit-users-role-to-max-of-x/66373 "2021-07-19T10:36:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![neilmi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/neilmi/32/25931_2.png) [@neilmi](https://community.auth0.com/u/neilmi)\
**Post date:** [July 19, 2021, 10:36am UTC](https://community.auth0.com/t/limit-users-role-to-max-of-x/66373/1 "2021-07-19T10:36:52Z")

</div>

Hey guys,  
I’m currently want to limit users to have max of one role  
but i couldn’t find a way to limit it…  
any ideas?

---

<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:** [July 19, 2021, 4:41pm UTC](https://community.auth0.com/t/limit-users-role-to-max-of-x/66373/3 "2021-07-19T16:41:57Z")

</div>

Hi @neilmi,

Welcome to the Auth0 Community!

This isn’t a setting we have in Auth0, but there are some ways you could throw an error if the user has more than one role. For example, you could create an Action that checks how many roles the user has and blocks the login if there is more than one.

With that said, you should be controlling how the user is assigned roles. What is the scenario where the user could end up with multiple roles without your applications allowing it?

---

<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:** [August 23, 2021, 4:23pm UTC](https://community.auth0.com/t/limit-users-role-to-max-of-x/66373/4 "2021-08-23T16:23:45Z")

</div>

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