Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

I am working on a Blazor Server App. How can I get all the roles a user has?

$
0
0

I am trying to get all roles a user has by using .Roles

my problem is that individualUser.Roles always returns null. I am VERY new to Blazor .net authentication, can somebody explain what am I missing? Thank you.

This is what I have tried:

private string GetRoleForUser(    CoolAviationTrainingSolutions.Models.ApplicationUser individualUser){    string roleslist = individualUser.Roles.ToString();    return roleslist;}

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>