question

AmitSinghRathore-7248 avatar image
0 Votes"
AmitSinghRathore-7248 asked

I would like to set the AddMicrosoftIdentityWebApp based on the request url (B2E, B2C) type to achieve authentication in Statup.cs

he code we are trying in ConfigureServices(IServiceCollection services) method in Statup.cs

//Based on request type the code should pick the configuration needed services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme).AddMicrosoftIdentityWebApp(Configuration.GetSection("AzureAdB2E")) // AzureAdB2E is config settings in appsettings.json eg:"Instance,Domain,ClientId" etc..Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme) // AzureAdB2E is config settings in appsettings.json eg:"Instance,Domain,ClientId" etc..AddMicrosoftIdentityWebApp(Configuration.GetSection("AzureAdB2C"));

The Error

Name Value Type
Message "Scheme already exists: Cookies" string

dotnet-aspnet-core-generaldotnet-runtime
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers