- Newest
- Most votes
- Most comments
This error is likely related to how the NameID is being handled between your Cognito User Pool and the Shibboleth IdP. Here are some potential causes and solutions:
-
NameID Format Mismatch: Amazon Cognito requires a specific format for the NameID claim. The SAML IdP must include a
NameIDclaim in the SAML assertion. For Cognito, theNameIDis used to identify returning federated users, and it must be case-sensitive and exact. While you're requestingurn:oasis:names:tc:SAML:2.0:nameid-format:persistent, your university's IdP might not support this format or might be configured differently. -
Attribute Mapping Issue: You mentioned mapping "NameID" to a custom attribute "eppn." This could be causing confusion. The NameID in the SAML assertion is a special identifier that Cognito uses to recognize returning users, and it should be mapped from an attribute that doesn't change. If the "eppn" value changes, users won't be able to sign in again.
-
Immutable Attribute Conflict: Check if you're trying to map to any immutable attributes in Cognito. You can identify immutable attributes using the AWS CLI command:
aws cognito-idp describe-user-pool --user-pool-id YOUR-POOL-ID --query 'UserPool.SchemaAttributes[?Mutable==false].Name'.
Recommended actions:
-
Use network capture tools in your browser to retrieve the SAML response and verify the NameID format being sent by Shibboleth.
-
Ensure the attribute you're using for NameID has values that don't change, as Cognito identifies returning users by their unique and case-sensitive NameID claim.
-
Work with your university's OIT to ensure they're sending the NameID in the format Cognito expects. Even though they've configured it to be persistent, there might be other format requirements that aren't being met.
-
Consider removing the custom attribute mapping for NameID and let Cognito use the default NameID from the SAML assertion.
-
If the issue persists, check if your university's IdP is sending any other required attributes correctly and that there are no conflicts with immutable attributes in your user pool.
Sources
Using SAML identity providers with a user pool - Amazon Cognito
Troubleshoot Amazon Cognito - Amazon Cognito
Things to know about SAML IdPs in Amazon Cognito user pools - Amazon Cognito
answered 10 months ago
Relevant content
asked 3 years ago
asked 3 months ago
