While trying to get WSFederation working inside an ASP.NET Core application, I got the following error message:
SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: '[PII is hidden]'. Did not match: validationParameters.ValidAudience: '[PII is hidden]' or validationParameters.ValidAudiences: '[PII is hidden]'.
Hiding the PII seems a good idea from a security perspective but makes it hard to debug this problem.
To make the PII visible, you can add the following line of code:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IdentityModelEventSource.ShowPII = true; |