Configuring attribute mapping for your user pool
Under the Sign-in experience tab, in the configuration of each identity provider (IdP) that you configure in your user pool, you can map IdP attributes or assertions to user pool attributes. For more information, see Specifying identity provider attribute mappings for your user pool.
Note
Currently, only the Facebook id
, Google sub
, Login with Amazon
user_id
, and Sign in with Apple sub
attributes can be mapped to
the Amazon Cognito User Pools username
attribute.
Note
The attribute in the user pool must be large enough to contain the values of the mapped identity provider attributes, or an error will occur when users sign in. Custom attributes should be set to the maximum 2048 character size if mapped to identity provider tokens.
You must create mappings for any attributes that are required for your user pool.
To specify a social identity provider attribute mapping for your user pool
-
Go to the Amazon Cognito console
. If prompted, enter your AWS credentials. -
Choose User Pools from the navigation menu.
-
Choose an existing user pool from the list, or create a user pool.
-
Choose the Sign-in experience tab. Locate Federated identity provider sign-in.
-
Choose Add an identity provider, or choose the Facebook, Google, Amazon or Apple identity provider you have configured. Locate Attribute mapping, and choose Edit. For more information about adding a social identity provider, see Adding social identity providers to a user pool.
-
For each attribute you need to map, complete the following steps:
-
Select an attribute from the User pool attribute column. This is the attribute that is assigned to the user profile in your user pool. Custom attributes are listed after standard attributes.
-
Select an attribute from the
<provider>
attribute column. This will be the attribute passed from the provider directory. Known attributes from the social provider are provided in a drop-down list. -
To map additional attributes between your IdP and Amazon Cognito, choose Add another attribute.
-
-
Choose Save changes.
To specify a SAML provider attribute mapping for your user pool
-
Sign in to the Amazon Cognito console
. If prompted, enter your AWS credentials. -
In the navigation pane, choose User Pools, and choose the user pool you want to edit.
-
Choose the Sign-in experience tab and locate Federated sign-in.
-
Choose Add an identity provider, or choose the SAML identity provider you have configured. Locate Attribute mapping, and choose Edit. For more information about adding a SAML identity provider, see Adding SAML identity providers to a user pool.
-
For each attribute you need to map, complete the following steps:
-
Select an attribute from the User pool attribute column. This is the attribute that is assigned to the user profile in your user pool. Custom attributes are listed after standard attributes.
-
Select an attribute from the SAML attribute column. This will be the attribute passed from the provider directory.
Your identity provider might offer sample SAML assertions for reference. Some identity providers use simple names, such as
email
, while others use URL-formatted attribute names similar to:http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
-
To map additional attributes between your IdP and Amazon Cognito, choose Add another attribute.
-
-
Choose Save changes.