In my Program.cs file I added:
builder.Services.Configure<CookieAuthenticationOptions>(CookieAuthenticationDefaults.AuthenticationScheme, options =>
{
options.AccessDeniedPath = "/access-denied";
});
I added my custom AccessDenied.razor component/page and using
@attribute [Authorize(Roles = "Admin,Standard")]
at the top of pages or the AuthorizeView tag in the pages
<CascadingAuthenticationState>
<AuthorizeView Policy="RequireValidUser" Context="ImpersonationComponent">
<Authorized>
<Login />
</Authorized>
</AuthorizeView>
</CascadingAuthenticationState>
I was able to get role based authorization working.