Attribute Mappings
On this page
1.65.0
Saving an Identity Provider in Tenant Manager reapplies the values that Tenant Manager manages. By design, Tenant Manager replaces attributeMappings and applicationConfiguration. For more information, see Tenant Manager Identity Provider Restrictions.
Attribute mappings copy claims from an Identity Provider response to fields on the FusionAuth user or registration. Attribute mappings are a declarative alternative to reconcile lambdas. Each attribute mapping is a key and a value. Configure attribute mappings with the Identity Providers API or in Tenant Manager.
Keys#
A key names a field on the FusionAuth user or registration. A key must start with user. or registration.. For example:
user.emailis the user's email address. The linking strategy can use the email address to link the user.registration.data.subscriptionis custom registration data about the user's subscription.
Values#
A value names a field or claim in the Identity Provider response. The response has the same shape as the parameter of the matching reconcile lambda type.
The OpenID Connect reconcile lambda has two parameters, jwt and id_token. An OpenID Connect attribute mapping value must start with one of the parameter names, to name the parameter that the value reads.
Write values in dot notation or in JSON pointer notation. To refer to a field whose name contains . or /, use JSON pointer notation. JSON pointer notation requires the following escapes:
- Write a literal
~as~0. - Write a literal
/as~1.
For example:
id_token.preferred_usernamereads thepreferred_usernameclaim of the OpenID Connect ID token, in dot notation./jwt/https:~1~1example.com~1favorite_colorreads the custom claimhttps://example.com/favorite_colorof the OpenID Connect access token, in JSON pointer notation.assertion.attributes.email.0reads the first email attribute value of a SAML response, in dot notation. Every SAML attribute is an array, so a single value needs an index. The value doesn't include thesamlResponselambda parameter name. Only OpenID Connect values include the parameter name./assertion/attributes/email/0reads the first email attribute value of a SAML response, in JSON pointer notation.
Reconciliation#
During reconciliation, FusionAuth reads each value from the Identity Provider response, and assigns the value to the key's field on the user or registration. Every attribute mapping is optional. When FusionAuth can't read a value or set a key, FusionAuth skips the mapping and continues reconciliation.
Reconcile lambdas and attribute mappings are mutually exclusive. An Identity Provider can't have both.
Related
Learn about the APIs for retrieving and updating Tenant Manager configuration.
Learn how Identity Providers work with Applications, CIMD clients, and Application-specific overrides.
Learn how to send users from the hosted login pages straight to an Identity Provider with the idp_hint and login_hint parameters.
Learn about global and tenant-scoped Identity Providers, and how to limit the links that each user can have to an Identity Provider.