I'm using ASP.NET Core 5 with Azure AD authentication.
I created a new template web app and sign in and sign out with Azure AD work great.
But when I copied the relevant code in Startup.cs
and appsettings.json
from the template web app into another web app, I'm getting a 400 error response when I click the Sign Out link to /MicrosoftIdentity/Account/SignOut
["The scheme field is required."]
in Startup.cs
, I've added:
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(Configuration.GetSection("AzureAd"));
and
services.AddRazorPages()
.AddMicrosoftIdentityUI();
I've compared the requests in the template web app that works and the other web app that doesn't, and I can't see any difference in the request headers to /MicrosoftIdentity/Account/SignOut.
What "scheme" am I missing?