How to Handle Inconsistent SAML IdP Responses when Auth0 Is Acting as a Service Provider
Last Updated:
Overview
Applies To
- Actions SAML mapping
Solution
e.g., the below mapping helps when the casing of the attribute name is inconsistent:
{"given_name": [
"FirstName",
"firstName"
],
"family_name": [
"LastName",
"lastName"
]}
Auth0 will look for the first element in the array within the SAML response, if it is not found, it will move on to the next element in the array and continue until a match is found or there are no more elements to search for.
Unmapped attributes will be added to the root of the user's profile with the same name that the SAML IdP passed.
Now, when attempting to fetch, for example, the user's first name in an Action, the Action code can use `event.user.given_name` to reliably pick up the attribute value.