ShowPII in Startup.cs has no effect

Thord J 1 Reputation point


I have an ASP.NET application that authenticates via Azure Active Directory. It appears to have stopped working with an error as follows:

IDX20803: Unable to obtain configuration from: '[PII is hidden. For more details, see]'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

From searching the web I have found adding Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true in Startup.cs as below should display the error details:

   public void Configuration(IAppBuilder app)  
               ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;  
               IdentityModelEventSource.ShowPII = true;   

This works locally but unfortunately not on the remote server where the error message above continues to show.
I do not know of another way to debug this issue without the error information.

Is there anything else that would determine whether the PII is shown?

Internet Information Services
A set of technologies in the .NET Framework for building web applications and XML web services.
4,124 questions
A set of technologies in the .NET Framework for building web applications and XML web services.
3,236 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,313 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce ( 54,621 Reputation points

    as its a configuration error, there probably is no PII data.