Auth0 Home Blog Docs

Displaying roles for user in C# .Net Core



In my code I have
var roles1 = claims.Where(c => c.Type == ClaimTypes.Role).ToArray();

in the view
@foreach (var city in ViewBag.roles) {


I get nothing back and no errors. I know I have roles with the current user because authorization for the views is working correctly. I am a bit confused.