# SAML - how to map the Auth0 name with the SAML attribut

**URL:** <https://community.auth0.com/t/saml-how-to-map-the-auth0-name-with-the-saml-attribut/191282>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [August 30, 2025, 12:28am UTC](https://community.auth0.com/t/saml-how-to-map-the-auth0-name-with-the-saml-attribut/191282 "2025-08-30T00:28:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![solenne](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/solenne/32/73229_2.png) [@solenne](https://community.auth0.com/u/solenne)\
**Post date:** [August 30, 2025, 12:28am UTC](https://community.auth0.com/t/saml-how-to-map-the-auth0-name-with-the-saml-attribut/191282/1 "2025-08-30T00:28:13Z")

</div>

Hi,

I’ve configured an Enterprise connection via SAML. In the mapping I put :

{  
“name”: “[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname”](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname%E2%80%9D),  
“email”: “[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress”](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress%E2%80%9D),  
“given\_name”: “[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname”](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname%E2%80%9D),  
“family\_name”: “[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname”](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname%E2%80%9D)  
}

when the SAML attributes are :

```auto
<Attribute Name="http://schemas.microsoft.com/identity/claims/displayname">

```

XXX

```auto
</Attribute>

```

```auto
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname">

```

XXX

```auto
</Attribute>

```

```auto
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname">

```

XXX

```auto
</Attribute>

```

```auto
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress">

```

[xxx@xxx.com](mailto:xxx@xxx.com)

```auto
</Attribute>

```

```auto
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name">

```

[xxx@xxx.com](mailto:xxx@xxx.com)

```auto
</Attribute>

```

```auto
</AttributeStatement>

```

What ever I put for the attribut “name” for auth0 the user id alway created with name = [http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name)

Every other variable have the correct value (given\_name, email,…)

Can you help me force another value than “name” for the name ?

Thx

---

<div class="post-metadata">

**Author:** ![Charles920Allen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/charles920allen/32/72928_2.png) [@Charles920Allen](https://community.auth0.com/u/Charles920Allen)\
**Post date:** [August 30, 2025, 11:27am UTC](https://community.auth0.com/t/saml-how-to-map-the-auth0-name-with-the-saml-attribut/191282/2 "2025-08-30T11:27:59Z")

</div>

Hello!

That’s a very specific issue. Auth0’s SAML configuration has a hardcoded mapping where the name attribute will always be sourced from the claim, regardless of your other attribute mappings. Since this behavior cannot be changed directly, the best solution is to use a Rule in Auth0. By creating a simple JavaScript rule, you can post-process the user profile after authentication and overwrite the name attribute with a custom value, such as a combination of given\_name and family\_name, giving you the control you need.

---

<div class="post-metadata">

**Author:** ![solenne](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/solenne/32/73229_2.png) [@solenne](https://community.auth0.com/u/solenne)\
**Post date:** [August 30, 2025, 7:27pm UTC](https://community.auth0.com/t/saml-how-to-map-the-auth0-name-with-the-saml-attribut/191282/3 "2025-08-30T19:27:06Z")

</div>

Got it ! I’ll try to do this with a rule.

Thank you for your answer !

---

<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:** [September 13, 2025, 7:27pm UTC](https://community.auth0.com/t/saml-how-to-map-the-auth0-name-with-the-saml-attribut/191282/4 "2025-09-13T19:27:11Z")

</div>

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