SAML audience mismatch: what to compare before changing configuration
Compare the assertion’s Audience value with the service provider’s expected Entity ID. Keep that comparison separate from the ACS endpoint and Recipient checks. An assertion shows what was issued; it does not establish what an administrator configured.
What the error means
A SAML audience restriction limits the intended relying parties. The service provider must evaluate whether it is an allowed audience. Audience is an identifier; an ACS URL is an endpoint. Similar-looking strings do not make those fields interchangeable.
Collect both sides of the comparison
- The application’s exact error and a timestamp with timezone.
- The Audience value from the failed assertion.
- The expected SP Entity ID from the application’s current metadata or authoritative configuration.
- The environment and application instance: production and staging may use different identifiers.
If the expected value is unavailable, record it as unknown. A matching Recipient or Destination does not fill that gap.
Worked example: staging identifier in a production assertion
This is synthetic evidence, not a customer incident:
Observed Audience: urn:example:payroll:staging
Expected SP Entity ID: urn:example:payroll:production
Recipient: https://payroll.example.com/saml/acs
Expected ACS: https://payroll.example.com/saml/acsThe supplied audience values differ. The supplied Recipient and ACS values match. That supports investigating the audience failure while preserving the endpoint settings. It does not identify which administrative setting caused the wrong audience to be issued.
Choose the correction from verified configuration
- Confirm the expected Entity ID belongs to the intended application instance.
- Inspect the identity provider’s relying-party configuration and any application-specific identifier mapping.
- Determine whether the issued identifier or the application’s expectation is outdated. Record the current setting before making a narrow, approved correction.
- Capture a fresh login attempt. Confirm the new audience is accepted and review remaining application errors.
Do not replace the ACS URL with the Entity ID or disable audience validation. Do not edit a captured assertion and present it as a successful login test: that changes the artifact and may invalidate its signature.
What a match does not prove
Matching audience values resolve this comparison only. Trust, signature coverage, timing, subject confirmation, and application authorization still need their own evidence. If several audience restrictions are present, retain their structure for evaluation rather than flattening them into an arbitrary list.
Use SSO Doctor with explicit expectations
SSO Doctor supports SAML evidence analysis and expected-versus-actual comparisons. Supply only an authorized, sanitized reproduction and the independently confirmed expectation. Decoding XML is inspection; cryptographic verification requires independently trusted signing material. A report cannot prove an administrative setting that was never supplied.
Reference
OASIS SAML 2.0 Core, sections 2.5.1.4 and 2.4.1.2, defines audience restrictions and subject-confirmation data.