相关文章推荐

Hi Nick,
Need your urgent assistance. I am using your project from GitHub. But it gives me below error when controls comes in AssertionConsumerService() action method while reading below line
binding.ReadSamlResponse(Request.ToGenericHttpRequest(), saml2AuthnResponse);

Below is the error:

An unhandled exception occurred while processing the request.

SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: ‘[PII of type ‘System.String’ is hidden. For more details, see Search - Microsoft Bing ]’. Did not match: validationParameters.ValidAudience: ‘[PII of type ‘System.String’ is hidden. For more details, see Search - Microsoft Bing ]’ or validationParameters.ValidAudiences: ‘[PII of type ‘System.String’ is hidden. For more details, see Search - Microsoft Bing ]’.

Below is the data populated when control reaches at the particular line where issue cropps up.

Appsettings.Json code as below :
“Saml2”: {
“IdPMetadata”: “ https://trial-9182030.okta.com/app/exk3fc23aqXlhmQFA697/sso/saml/metadata ”,
“Issuer”: “Okta_SAML_Example1”,
“SignatureAlgorithm”: “ xmldsig-more namespace ”,
“CertificateValidationMode”: “ChainTrust”,
“RevocationMode”: “NoCheck”

OKTA Set up :