Back to Aspnetcore

Additional Scopes Standalone NonMEID

aspnetcore/blazor/security/includes/additional-scopes-standalone-nonMEID.md

latest448 B
Original Source

Add a pair of xref:Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions for openid and offline_access xref:Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.DefaultAccessTokenScopes:

csharp
builder.Services.AddMsalAuthentication(options =>
{
    ...
    options.ProviderOptions.DefaultAccessTokenScopes.Add("openid");
    options.ProviderOptions.DefaultAccessTokenScopes.Add("offline_access");
});