Open leungkimming opened 9 months ago
''' builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddMicrosoftIdentityWebApi(options => { builder.Configuration.Bind("AzureAdAPI", options); options.TokenValidationParameters.NameClaimType = "preferred_username"; }, options => { builder.Configuration.GetSection("AzureAdAPI"); } ); '''
''' builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddMicrosoftIdentityWebApi(options => { builder.Configuration.Bind("AzureAdAPI", options); options.TokenValidationParameters.NameClaimType = "preferred_username"; }, options => { builder.Configuration.GetSection("AzureAdAPI"); } ); '''