# Access roles of current logged in user

**URL:** <https://community.auth0.com/t/access-roles-of-current-logged-in-user/51725>\
**Category:** Get Help\
**Tags:** blazor, roles\
**Created:** [October 17, 2020, 11:44am UTC](https://community.auth0.com/t/access-roles-of-current-logged-in-user/51725 "2020-10-17T11:44:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rakeshkananigtu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rakeshkananigtu/32/24984_2.png) [@rakeshkananigtu](https://community.auth0.com/u/rakeshkananigtu)\
**Post date:** [October 17, 2020, 11:44am UTC](https://community.auth0.com/t/access-roles-of-current-logged-in-user/51725/1 "2020-10-17T11:44:41Z")

</div>

Hi Team,

I am working on blazor web assembly application and integrated Auth0 login screen.  
Assigned Role to a logged-in user from Auth0 Dashboard. I want to try to access logged in user roles from blazor app, but not getting.

Tried with @context.User.IsInRole(“admin”) method which returns  
always false.

---

<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:** [October 19, 2020, 11:04pm UTC](https://community.auth0.com/t/access-roles-of-current-logged-in-user/51725/3 "2020-10-19T23:04:48Z")

</div>

Hi @rakeshkananigtu,

Welcome to the Community!

You can add the user’s roles to the token, and then you can check it out in your application.

> **[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.

---

<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:** [November 3, 2020, 11:04pm UTC](https://community.auth0.com/t/access-roles-of-current-logged-in-user/51725/4 "2020-11-03T23:04:51Z")

</div>

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