JWT token [PII is hidden] error

Expires: ‘[PII is hidden by default. Set the ‘ShowPII’ flag in IdentityModelEventSource.cs to true to reveal it.]’

When this error occurs during API authentication with a JWT token it means that a security parameter like ‘issuer’ or ‘authorization_endpoint’ is not set or not set correctly.

To view which parameter causes the error (unhide PII) enter following code in the API’s Program.cs:

IdentityModelEventSource.ShowPII = true;