if you review the source:
you will see it does not directly support configuration reload. you may be able to add a sentinel key, and manually update the injected authentication options on key change.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have used AddMicrosoftIdentityWebApp in my program.cs class for Microsoft Authentication.
builder.Services.AddAuthentication(opts =>
{
opts.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
opts.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
})
.AddMicrosoftIdentityWebApp(opts =>
{
var azureOptions = builder.Services.BuildServiceProvider().GetRequiredService<IOptionsMonitor<AzureAppOptions>>().CurrentValue;
opts.Instance = azureOptions.Instance;
opts.TenantId = azureOptions.TenantId;
opts.ClientId = azureOptions.ClientId;
opts.CallbackPath = azureOptions.CallbackPath;
}, openIdConnectScheme: OpenIdConnectDefaults.AuthenticationScheme);
If I have to update Azure App details then, I have to restart my application because AddMicrosoftIdentityWebApp only runs at start up.
Is it possible to modify AddMicrosoftIdentityWebApp so that it start using new app details without restarting the application.
if you review the source:
you will see it does not directly support configuration reload. you may be able to add a sentinel key, and manually update the injected authentication options on key change.