Mapping Email in NameID Field
Last Updated:
Overview
This article addresses the scenario in which Auth0 is used as the identity provider (IdP) for all available platforms. A new Learning Management System (LMS) is planned to provide a Single Sign On experience, and Auth0 should be the IdP for it as well. However, in the process of implementing the LMS, the need to map the email instead of the user ID in the Subject's NameID field might appear.
So it should be like the following:
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">test@test.com</saml:NameID>
...redacted
</saml:Subject>
instead of
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">auth0|636172fecba08c63c2a306c5</saml:NameID>
...redacted
</saml:Subject>
Applies To
- Mapping
- Learning Management System (LMS)
- SAML
- Addon
- Auth0 as IdP
Solution
The user's user ID is sent by default in the Subject's NameId attribute. If the user's email is needed instead, overwrite it with the nameIdentifierProbes in the SAML addon settings.
Here is the minimum sample to implement this use case:
{
"mappings": {
"email": "Email"
},
"nameIdentifierProbes": [
"Email"
]
}