Microsoft Security | Microsoft Entra | Microsoft Entra ID
A cloud-based identity and access management service for securing user authentication and resource access
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a Asp.net MVC web application that uses OpenIdConnect Auth code flow for user authentication. The code is working fine when we are debugging locally. We noticed that Authorization code is not generating after deploying in AppService.
Below is my code snippet -
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
// ...
CookieManager = new SystemWebCookieManager(),
});
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = ConfigHelper.ClientId,
Authority = $"
PostLogoutRedirectUri = ConfigHelper.PostLogoutRedirectUri,
RedirectUri = ConfigHelper.PostLogoutRedirectUri,
Scope = ConfigHelper.AppScope,
TokenValidationParameters = new TokenValidationParameters
{
ValidateIssuer = false,
},
CookieManager = new SystemWebCookieManager(),
Notifications = new OpenIdConnectAuthenticationNotifications
{
AuthorizationCodeReceived = OnAuthorizationCodeReceivedAsync,
AuthenticationFailed = OnAuthenticationFailedAsync
}
});
A cloud-based identity and access management service for securing user authentication and resource access
An API that connects multiple Microsoft services, enabling data access and automation across platforms