DEV Community

Discussion on: Securing a Blazor WebAssembly Hosted Apps with Azure Active Directory - Part 2

Collapse
 
vipehowlett profile image
Evan Howlett

Instead of doing

AddMicrosoftIdentityWebApi(options =>
        {
            builder.Configuration.Bind("AzureAd", options);
            options.TokenValidationParameters.RoleClaimType =
                "http://schemas.microsoft.com/ws/2008/06/identity/claims/role";
        },
        options => { builder.Configuration.Bind("AzureAd", options); });
Enter fullscreen mode Exit fullscreen mode

do

AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("AzureAd"));
Enter fullscreen mode Exit fullscreen mode