Skip to content

External IdP (PingFederate) SAML SSO to IAM Identity Center fails with AUTHENTICATION_FAILED despite valid, correctly-signed assertion

0

Summary

I've configured PingFederate 13.0.3 as an external SAML 2.0 identity provider for AWS IAM Identity Center. The identity source change was accepted successfully by AWS ("You successfully changed the identity source from IAM Identity Center to an external identity provider (IdP)"), and the certificate trust relationship is confirmed correct (AWS shows the exact same certificate PF uses to sign). However, every single login attempt — tested with two different, freshly-created users, both SP-initiated and IdP-initiated flows — is rejected at the ACS endpoint with a generic AUTHENTICATION_FAILED error.

Environment

IdP: PingFederate 13.0.3 AWS region: eu-north-1 IAM Identity Center instance: ssoins-650838f69d53acfa Identity source: External identity provider (SAML 2.0) IdP Issuer / Entity ID: https://<redacted-tunnel-host> (publicly reachable HTTPS endpoint)

What's confirmed correct

Metadata exchange: AWS successfully imported PF's IdP metadata; the identity source change completed without error Certificate trust: AWS's stored SAML certificate (Settings → Manage SAML 2.0 certificates) exactly matches PF's actual signing certificate — same CN, same expiration date NameID: format emailAddress, value matches the AWS user's email exactly (verified byte-for-byte) Conditions/timing: NotBefore/NotOnOrAfter window is valid at time of submission; server clocks confirmed in sync (no drift) AudienceRestriction: matches AWS's entity ID exactly (https://eu-north-1.signin.aws.amazon.com/platform/saml/d-<redacted>) Destination attribute: present on samlp:Response, matches the ACS URL exactly Signing: both the samlp:Response and the saml:Assertion are signed (RSA-SHA256), signatures placed correctly per XML-DSig/SAML core schema (immediately after each element's <Issuer>) User account: Enabled status in IAM Identity Center, correctly assigned a Permission Set on the target AWS account, no pending/incomplete flags visible Two separate, freshly-created test users produce the identical failure — ruling out anything specific to one user record Both SP-initiated and IdP-initiated flows fail identically — ruling out anything specific to InResponseTo/AuthnRequest binding

The error

Generic frontend message: "Something went wrong — Looks like this code isn't right. Please try again." Underlying error code (visible in the raw HTTP response body via browser dev tools): AUTHENTICATION_FAILED

Sample Request IDs from failed attempts:

e565b934-4da1-4d88-9400-f0b2a0cf6104 2cc042a7-9588-46c9-98dd-c854d29fda47 c0f2b088-051a-47aa-b091-740c9643ec4e bdbe40c8-232f-402d-80d0-d648879fcac0

Question

Given every structural/cryptographic element I can independently verify is correct, and the failure is 100% reproducible across different users and both SSO initiation modes, what else does IAM Identity Center's SAML processing validate that could cause a blanket AUTHENTICATION_FAILED? Specifically:

Are there undocumented requirements on the AttributeStatement (e.g., is a specific attribute mandatory even for basic authentication, beyond what's needed for ABAC)? Does IAM Identity Center require a specific AuthnContextClassRef value rather than unspecified? Is there a propagation delay after "Successfully changed identity source" before external IdP logins are actually accepted, separate from the confirmation banner? Any way to get more detailed server-side error output than the generic AUTHENTICATION_FAILED shown in the browser?

2 Answers
1

The most likely cause is that the NameID is matched against the "Username," not the "email address."

The official documentation "Using SAML and SCIM identity federation with external identity providers - AWS IAM Identity Center" explicitly states the following:

The SAML assertion's Subject NameID value must exactly match the Username of a user provisioned in IAM Identity Center. Sign-in fails if IAM Identity Center cannot match the NameID to a Username, even when the external IdP authenticates the user successfully.

Furthermore, an AWS Knowledge Center article "Troubleshoot IAM Identity Center SSO login failures | AWS re:Post" states the following:

Verify that the SAML nameID value sent by your IdP exactly matches the case-sensitive username in IAM Identity Center. The match is based on username, not email address.

This may actually differ slightly from what you have verified. You confirmed that the NameID value matches the AWS user's email address exactly (down to the byte level), but IAM Identity Center performs the match against the "Username" field, not the "Email" field.

If the "Username" field for the two test users in IAM Identity Center happens to be set to a value other than the email address (e.g., an employee ID or a "firstname.lastname" format), authentication will fail because the string does not match the target Username—even if the NameID format is set to "emailAddress."

Open the user details screen in IAM Identity Center and verify whether the value in the "Username" field matches the NameID value sent by PingFederate exactly (including case sensitivity); check this separately from the "Email" field. If they do not match, this is highly likely to be the direct cause of the failure.

answered a month ago

EXPERT

reviewed a month ago

  • Thanks for adding that, Taka. It seems that combining our answers gives us the right solution.

1

The AUTHENTICATION_FAILED (often accompanied by the "Looks like this code isn't right" frontend message) in IAM Identity Center is a generic catch-all for SAML validation failures. Since you have already verified the cryptographic trust (signatures, certificates, timing, entity IDs), the issue almost certainly lies in strict data matching or schema validation.

To answer your questions:

  1. AttributeStatement & Matching requirements: IAM Identity Center is strictly case-sensitive regarding the NameID. Even if you verified it byte-for-byte, ensure it perfectly matches the Username attribute stored in the AWS Identity Store (not just the contact email field). Furthermore, ensure the assertion is entirely unencrypted (AWS does not support encrypted SAML assertions) and that the <Subject> element properly encapsulates the <NameID>.
  2. AuthnContextClassRef: AWS Identity Center generally expects urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport or unspecified. Ensure PingFederate is actively including this element in the assertion, as its complete omission can cause validation to fail.
  3. Propagation delay: While the identity source toggle in the console is usually immediate, user assignments and backend state synchronization can take a few minutes. However, if the issue persists beyond 15–30 minutes, it is not a propagation delay.
  4. Server-side error visibility: You can get the exact, detailed server-side error by querying AWS CloudTrail. Look for the event name ExternalIdPDirectoryLogin (Event source: sso.amazonaws.com) in the AWS Management account. The errorMessage or responseElements field in the raw JSON record will explicitly state what failed (e.g., "Subject mismatch", "Invalid signature", etc.).

Actionable next step: Check the ExternalIdPDirectoryLogin event in CloudTrail. A very common resolution for this exact symptom with newly created test users is an invisible desync between the IdP and AWS Identity Store. Deleting the manually created user in Identity Center and re-creating it (or letting SCIM provision it) frequently resolves this.

References:

EXPERT

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.