I have Blazor server based app. I basically show database columns for admins in app. The auth is done using Azure AD, in startup.cs i have added
options.AddPolicy("AppAdmins", policy => policy.RequireRole("Admin", "SuperAdmin", "Owner"));
In Main page i have
<AuthorizeView Policy="AppAdmins">
<Authorized>
@Body
</Authorized>
<NotAuthorized>
You are not authorized to use this application.
</NotAuthorized>
</AuthorizeView>
This works, now for specific role users, i need to show db columns specific to role. How do i access roles in Index.razor or Index.razor.cs to filter the fields?
I'm new to Blazor and .Net Core.