Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 8.0/BlazorWebAppOidc/BlazorWebAppOidc/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@
// Set MapInboundClaims to "false" to obtain the original claim types from
// the token. Many OIDC servers use "name" and "role" (singular) rather
// than the SOAP/WS-Fed defaults in ClaimTypes. The following code uses
// "name" and "roles" (plural) to match Entra ID for the name and role
// "name" and "appRoles" to match Entra ID for the name and role
// claim types. Adjust these values if your identity provider uses
// different claim types.

oidcOptions.MapInboundClaims = false;
oidcOptions.TokenValidationParameters.NameClaimType = JwtRegisteredClaimNames.Name;
oidcOptions.TokenValidationParameters.RoleClaimType = "roles";
oidcOptions.TokenValidationParameters.RoleClaimType = "appRoles";
// ........................................................................

// ........................................................................
Expand Down
4 changes: 2 additions & 2 deletions 8.0/BlazorWebAppOidcBff/BlazorWebAppOidc/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@
// Set MapInboundClaims to "false" to obtain the original claim types from
// the token. Many OIDC servers use "name" and "role" (singular) rather
// than the SOAP/WS-Fed defaults in ClaimTypes. The following code uses
// "name" and "roles" (plural) to match Entra ID for the name and role
// "name" and "appRoles" to match Entra ID for the name and role
// claim types. Adjust these values if your identity provider uses
// different claim types.

oidcOptions.MapInboundClaims = false;
oidcOptions.TokenValidationParameters.NameClaimType = JwtRegisteredClaimNames.Name;
oidcOptions.TokenValidationParameters.RoleClaimType = "roles";
oidcOptions.TokenValidationParameters.RoleClaimType = "appRoles";
// ........................................................................

// ........................................................................
Expand Down