Windows Authentication Error: The Size of the Request Headers is Too Long

How to resolve when authenticating using "Windows Authentication", an error message is displayed - "The size of the request headers is too long." ?

If Windows authentication has been properly configured as per Enabling Windows Authentication  article, but is still failing with the error message “400: The size of the request headers is too long.” It might be that the authentication redirect is going to Orchestrator instead of Identity.

To confirm it, access “UiPath.Orchestrator.dll.config” file and check the status of the “ExternalAuth.System.OpenIdConnect.Enabled” key. This one by-default should be set to “True”, if is set to “False” then authentication is redirector to Orchestrator instead of Identity and an error message is displayed.
To fix the problem, set the “ExternalAuth.System.OpenIdConnect.Enabled” key to “True” and restart IIS.