# Customize SAML Name ID

**URL:** <https://community.auth0.com/t/customize-saml-name-id/123956>\
**Category:** Get Help\
**Tags:** application, sso\
**Created:** [January 2, 2024, 5:03am UTC](https://community.auth0.com/t/customize-saml-name-id/123956 "2024-01-02T05:03:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravanan109587](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saravanan109587/32/50664_2.png) [@saravanan109587](https://community.auth0.com/u/saravanan109587)\
**Post date:** [January 2, 2024, 5:03am UTC](https://community.auth0.com/t/customize-saml-name-id/123956/1 "2024-01-02T05:03:19Z")

</div>

We are trying to integrate auth0 with [genesys cloud](https://www.genesys.com/en-sg). As part of that we are configuring Auth0 as Identity provider and genesys as Service provider.  
When we enable SAML protocol in auth0, genesys expect email address to be a name identifier in SAML response, But we are getting auth0 user id as nameidentifer.  
We have referred few of auth0 articles to customize nameidprobs [link](https://community.auth0.com/t/mapping-email-in-nameid-field/95828), But its not working, Still we are getting user id in Name id field.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/d/4/d463c6bd924dd4015bfc93152e939941cd43cb88.png)  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/c/e/ce0e6439e789df888b961d9928a122687716dbb8.png).  
Below is the SAML settings,  
{  
“mappings”: {  
“email”: “[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress)”  
},  
“nameIdentifierProbes”: [  
“[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress)”  
]  
}.  
Could someone suggest what am I missing?

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [January 2, 2024, 1:31pm UTC](https://community.auth0.com/t/customize-saml-name-id/123956/2 "2024-01-02T13:31:09Z")

</div>

Hi @saravanan109587 !

Could you try out the following scenarios under the SAML2 Web App Settings?

1. Mapp the “/nameidentifier” and “/emailaddress” claims with the same user property “email”:

```auto
{"mappings": {
"name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/userName",
"email": ["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"]
},
  "nameIdentifierProbes": [
    "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
  ]

```

1. Or try removing from “mappings” the  
`"user_id": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"`  
so the Settings looks like this:

```auto
{
  "mappings": {
    "name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/userName",
    "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
  },
  "nameIdentifierProbes": [
    "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
  ]
}

```

You feedback would be appreciated!

---

<div class="post-metadata">

**Author:** ![saravanan109587](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saravanan109587/32/50664_2.png) [@saravanan109587](https://community.auth0.com/u/saravanan109587)\
**Post date:** [January 2, 2024, 5:33pm UTC](https://community.auth0.com/t/customize-saml-name-id/123956/4 "2024-01-02T17:33:32Z")

</div>

Dear @marcelina.barycka ,  
Thanks for the suggestion, I have tried both the approach still no difference, Getting user id in nameidentifier.

```auto
{
  "mappings": 
       {
      "name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/userName",
      "email": ["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", 
                "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"]
      },
  "nameIdentifierProbes": [
    "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
  ]
}

```

```auto
 <saml:Subject>
      <saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">auth0|6579222a50a7dcd591899f34</saml:NameID>
      <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
        <saml:SubjectConfirmationData NotOnOrAfter="2024-01-02T18:27:46.773Z" Recipient="https://manage.auth0.com/tester/samlp"/>
      </saml:SubjectConfirmation>
    </saml:Subject>

```

---

<div class="post-metadata">

**Author:** ![saravanan109587](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saravanan109587/32/50664_2.png) [@saravanan109587](https://community.auth0.com/u/saravanan109587)\
**Post date:** [January 3, 2024, 3:39am UTC](https://community.auth0.com/t/customize-saml-name-id/123956/5 "2024-01-03T03:39:53Z")

</div>

Dear @marcelina.barycka ,  
Sorry it was my mistake that i have enabled both SAML and WS-Fed hence it was not reflecting. When i disable WS-Fed addon it worked.  
Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 17, 2024, 3:40am UTC](https://community.auth0.com/t/customize-saml-name-id/123956/6 "2024-01-17T03:40:39Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
