Use this when SSO or federated login fails.
Federation Troubleshooting
Troubleshoot federation and SSO by decoding the SAML response or JWT, checking issuer, audience and redirect URIs, signing certificates and their expiry, clock skew, and claim mappings for the user.
1. Check metadata/certs, entityID/audience, redirect/ACS URLs, clock skew, claims.
2. Expired signing certificate is common.
3. Redirect URI must match exactly.
4. Read IdP error codes.
5. Test with a known-good user.
SP request → IdP → assertion/token → SP validation
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
curl -sS -D - -o /dev/null <metadata-or-discovery-url>Primary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verify federation by validating issuer, signature, audience, claims and the original application flow Verify boundary
Capture a fresh federation transaction and expect the token or assertion to report the configured issuer, a currently trusted signing key, the intended audience or recipient and required identity claims. Confirm token validation status Success, timestamps inside the accepted clock window and that the service provider creates the expected authenticated session, then repeat the original application access from the same client. A valid signature shows integrity and trust in the signing key, but it does not show claim authorization, account lifecycle state or application policy.
Step 2 Known-good, broken and when it is fixed Verify boundary
Known-good requires a fresh transaction from the original client through the intended IdP and relying party, successful cryptographic and audience validation, required claims present, and the expected local session/authorization outcome. Verify logout/expiry or refresh behavior where relevant. A successful IdP login shows only the identity-provider step, but it does not show the assertion/token was issued for or accepted by the target service.
Step 3 Known-good, broken and when it is fixed Verify boundary
Verification for Single Sign-On & Federation → Federation Troubleshooting must discriminate known-good from broken/suspicious state. With curl -sS -D - -o /dev/null <metadata-or-discovery-url>, known-good is: the expected issuer/metadata endpoint is reachable over valid TLS and returns the expected service response. Broken/suspicious is: DNS/TLS/status/redirect behavior points to the wrong tenant, endpoint or unavailable federation service. Read back the same target after the minimal approved change, then compare issuer, audience, ACS/redirect URI, key IDs and timestamps in one failed versus known-good transaction.
Step 4 Branch federation troubleshooting at discovery, redirect, issuance, signature and claim consumption Narrow the fault
If federation fails before the identity provider is reached, inspect application discovery and redirect URI construction. If sign-in succeeds but no assertion or token is issued, verify relying-party registration, requested scopes and issuance policy. If a token arrives but signature validation fails, compare issuer metadata, key ID and active signing certificate rather than recreating the trust. If signature and audience are valid but access is denied, inspect required claims and their transformation. Capture the first rejected protocol message and correlate both sides before repeating the flow.
Step 5 Common mistakes Narrow the fault
- Clock skew breaking assertions.
Step 6 Native failure isolation and next-check logic Narrow the fault
Capture one failed transaction end-to-end without recording secret tokens. Identify whether failure occurs before redirect, at IdP authentication, while validating SAML assertion/JWT, during authorization-code exchange, in claims mapping or at local session creation. Compare issuer, audience, redirect/ACS URI, entity/client ID, signing key ID and timestamps with a known-good transaction. For intermittent failures, check key rollover, load-balanced node configuration and clock skew. Do not fix a signature or audience failure by disabling validation; correct the trust/metadata or endpoint mismatch.
Step 7 Observation-driven troubleshooting tree Narrow the fault
Troubleshoot Single Sign-On & Federation → Federation Troubleshooting from one exact failing target, revision/input and timestamp. Capture curl -sS -D - -o /dev/null <metadata-or-discovery-url> before mutation, then branch by the first divergent observation: metadata/discovery endpoint is unreachable, stay at DNS/TLS/service availability; metadata loads but issuer/endpoints/certificates differ, correct trust configuration; token arrives but signature/time/audience fails, inspect assertion validation; token validates but account/roles are wrong, move to claims mapping and application authorization. Typical failure signatures include stale metadata, certificate rollover mismatch, wrong issuer/entity ID, redirect URI mismatch, clock skew, audience/recipient error, invalid signature, missing NameID/subject claim, proxy-generated wrong callback or valid SSO token with rejected local session.
Step 8 Failure signatures, dependencies and operational guardrails Narrow the fault
Failure-signature and guardrail reference for Single Sign-On & Federation → Federation Troubleshooting: Stale metadata, certificate rollover mismatch, wrong issuer/entity ID, redirect URI mismatch, clock skew, audience/recipient error, invalid signature, missing NameID/subject claim, proxy-generated wrong callback or valid SSO token with rejected local session. Operational guardrail: Capture federation request/correlation ID and safe metadata identity while avoiding token disclosure; an HTTP-successful discovery endpoint does not show that live assertions validate or that application authorization succeeds. Dependencies that can mimic the same symptom are DNS/TLS, metadata freshness, certificate rollover, time synchronization, proxy/base-URL handling, cookie/session policy, claim rules, application callback URLs and identity-provider conditional access.
- Most failures are certificate, audience, redirect URI or clock problems.
- Decode the SAML response or JWT.
- Check both IdP and SP logs.
- SAML-tracer / browser network log — failing step
- IdP sign-in logs — error code
date -u— clock skew
ReferenceWhy it matters1 section · depth on demand
Federation failures cross metadata, trust, token issuance and relying-party validation
Federation separates the identity provider that authenticates a subject from the service provider that consumes an assertion or token. Metadata, signing keys, entity identifiers, redirect URIs, claim mappings and clock tolerance are owned at different boundaries and can drift independently. A token can be cryptographically valid yet unusable because audience, recipient or claim semantics are wrong. Preserve issuer, relying-party identifier, key ID and request correlation before changing federation trust so a successful retry does not erase the failed trust path.
ReferenceHow it works2 sections · depth on demand
How it works
Federation chains browser/client state, service-provider request, identity-provider authentication, protocol response, signature/trust validation, audience/recipient checks, claims mapping and local session creation. SAML, OAuth 2.0 and OpenID Connect expose different messages, but they share strict issuer, redirect/ACS URI, key, clock and state/nonce boundaries. Metadata or discovery documents describe intent; the live transaction still depends on the exact tenant, endpoint and signing/encryption key selected at runtime.
How it works
Single Sign-On & Federation → Federation Troubleshooting owns federation metadata/discovery, issuer and entity identifiers, signing/encryption certificates, redirect/POST endpoints, clock and nonce state, audience/recipient validation, claims transformation and relying-party session creation. Execution mechanics: The service provider discovers or is configured with the identity provider, redirects or sends an authentication request, receives a signed assertion/token, validates issuer, signature, time, audience and recipient, maps claims to a local identity and only then creates the application session. Keep adjacent dependencies separate: DNS/TLS, metadata freshness, certificate rollover, time synchronization, proxy/base-URL handling, cookie/session policy, claim rules, application callback URLs and identity-provider conditional access. The mapped read surface curl -sS -D - -o /dev/null <metadata-or-discovery-url> exposes HTTP reachability/status/headers for the documented metadata or discovery endpoint.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Single Sign-On & Federation → Federation Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc7522 · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.