@page "/" @using Microsoft.AspNetCore.Authorization @using TechHelper.Client.Pages.Common.Exam @code { [CascadingParameter] private Task authenticationStateTask { get; set; } protected override Task OnInitializedAsync() { return base.OnInitializedAsync(); Console.WriteLine(authenticationStateTask.Result.User.IsInRole("Student")); } }