# How to use RBAC with an Application (rather than an API)?

**URL:** <https://community.auth0.com/t/how-to-use-rbac-with-an-application-rather-than-an-api/45301>\
**Category:** Get Help\
**Tags:** aspnet-mvc, rbac\
**Created:** [June 25, 2020, 6:30pm UTC](https://community.auth0.com/t/how-to-use-rbac-with-an-application-rather-than-an-api/45301 "2020-06-25T18:30:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dean.dashwood](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dean.dashwood/32/12814_2.png) [@dean.dashwood](https://community.auth0.com/u/dean.dashwood)\
**Post date:** [June 25, 2020, 6:30pm UTC](https://community.auth0.com/t/how-to-use-rbac-with-an-application-rather-than-an-api/45301/1 "2020-06-25T18:30:20Z")

</div>

I’m creating an [ASP.Net](http://ASP.Net) MVC application. As such, I have configured an Application in the Auth0 dashboard (not an API).

I’ve created some roles, and added users to those roles.

When configuring an API, there is an option to enable RBAC. But I can’t see any equivalent when configuring an Application. And in my MVC code, I can see the claims that the logged-in user has, such as their name and e-mail address, but I can’t see any way to show what roles the user belongs to (or to authenticate based on role).

Could someone point me in the right direction? I’ve seen a similar post from a while ago that pointed towards a React example, but the React example adds roles to the user’s token based on things like their e-mail address, it doesn’t look at the RBAC-configured roles, and I can’t figure out how to do that. Thanks!

---

<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:** [June 26, 2020, 4:59pm UTC](https://community.auth0.com/t/how-to-use-rbac-with-an-application-rather-than-an-api/45301/3 "2020-06-26T16:59:18Z")

</div>

Hi @dean.dashwood,

Welcome to the Community!

You can add the roles to the access token or the ID token using this rule:

> **[Sample Use Cases: Rules with Authorization](https://auth0.com/docs/manage-users/access-control/sample-use-cases-rules-with-authorization)**
>
> Learn how to use rules with roles-based access control (RBAC). For use with our Authorization Core feature set.

Then, simply look at which role the user has to restrict/grant access.

---

<div class="post-metadata">

**Author:** ![dean.dashwood](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dean.dashwood/32/12814_2.png) [@dean.dashwood](https://community.auth0.com/u/dean.dashwood)\
**Post date:** [June 26, 2020, 10:37pm UTC](https://community.auth0.com/t/how-to-use-rbac-with-an-application-rather-than-an-api/45301/4 "2020-06-26T22:37:11Z")

</div>

That was enough to point me in the right direction Dan, thanks

---

<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:** [June 27, 2020, 1:30am UTC](https://community.auth0.com/t/how-to-use-rbac-with-an-application-rather-than-an-api/45301/5 "2020-06-27T01:30:13Z")

</div>

Let us know if you have any other questions!

---

<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:** [July 12, 2020, 1:30am UTC](https://community.auth0.com/t/how-to-use-rbac-with-an-application-rather-than-an-api/45301/6 "2020-07-12T01:30:15Z")

</div>

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