# Restricting access to a Blazor Component

**URL:** <https://community.auth0.com/t/restricting-access-to-a-blazor-component/40980>\
**Category:** Get Help\
**Tags:** authorize, blazor\
**Created:** [April 13, 2020, 9:24pm UTC](https://community.auth0.com/t/restricting-access-to-a-blazor-component/40980 "2020-04-13T21:24:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![liftee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/liftee/32/12778_2.png) [@liftee](https://community.auth0.com/u/liftee)\
**Post date:** [April 13, 2020, 9:24pm UTC](https://community.auth0.com/t/restricting-access-to-a-blazor-component/40980/1 "2020-04-13T21:24:59Z")

</div>

I am trying to restrict access to a Blazor Component with the

@attribute [Authorize(Roles = “admin”)]

I have added the role in the admin. How do I wire this up?

---

<div class="post-metadata">

**Author:** ![mkammann](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mkammann/32/14739_2.png) [@mkammann](https://community.auth0.com/u/mkammann)\
**Post date:** [May 5, 2020, 4:30am UTC](https://community.auth0.com/t/restricting-access-to-a-blazor-component/40980/2 "2020-05-05T04:30:38Z")

</div>

Same question here. Basic authentication and authorisation works, but am not getting anywhere with role based authorisation.  
Some help here would be really appreciated.  
Thanks.
