.NET CORE SSO Error ERR_TOO_MANY_REDIRECTS

nitin pawar 16 Reputation points
2021-09-21T06:00:28.017+00:00

I am using .NET Core 3.1 to develop MVC application. It uses Microsoft Azure Active Directory (SSO) authentication using OpenID.

SSO starts after clicking on a button (an action is called to return challenge, code below)

return Challenge(
new AuthenticationProperties { RedirectUri = "/" }, OpenIdConnectDefaults.AuthenticationScheme);

Everything works fine locally. However, after deploying application to IIS and accessing the application URL using host name (www.example.com/MyApp) I am getting ERR_TOO_MANY_REDIRECTS Error in the browser. This application gets loaded properly from the localhost of server as well.

I am not able to see any error on server side in event viewer. Please help me resolving this.

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.