Skip to content

Unable to post configure MicrosoftIdentityOptions on version 2.5.0 #2134

Answered by jmprieur
edionu97 asked this question in v2.x
Discussion options

You must be logged in to vote

@edionu97, in 2.x, you now need to specify the authentication scheme. 1.x was trying to guess, but sometimes was getting it wrong, and the ASP.NET Core team advised we don't try to guess.

you would need to write, in your case:

// in project that consumes the package above
services.Configure<MicrosoftIdentityOptions>(JwtBearerDefaults.AuthenticationScheme, opt =>
            {
                opt.ClientId = builder.Configuration["Some_config_key_pointing_to_a_client_id"];
            });

See https://github.com/AzureAD/microsoft-identity-web/wiki/v2.0#breaking-changes-1

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@edionu97
Comment options

Answer selected by edionu97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
v2.x
Labels
question Further information is requested answered
2 participants