Search code examples
itfoxtec-identity-saml2

SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences. (itfoxtec)


Using the ITFoxtec Identity SAML 2.0 component I am facing the "SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed" error. Once I read a token string in ReadClaimsIdentity. Please see attached image and link of the error.

enter image description here

https://i.sstatic.net/ZWAWH.png

Please revert me on the same as soon as possible.


Solution

  • The error cursor if the issuer configured in the application and the issuer for which the SAML 2.0 token is issued do not match.

    TestWebAppCore in Startup.cs line 37 the AllowedAudienceUris is loaded from configuration:

    saml2Configuration.AllowedAudienceUris.Add(saml2Configuration.Issuer);