System.InvalidOperationException: The AuthorizationPolicy named: 'View All Roles' was not found. code example
Example: System.InvalidOperationException: The AuthorizationPolicy named: 'View All Roles' was not found.
services.AddAuthorization(o =>
{
o.AddPolicy("FirstStepCompleted", policy => policy.RequireClaim("FirstStepCompleted"));
o.AddPolicy("Authorized", policy => policy.RequireClaim("Authorized"));
});