# How to change user id attribute when use saml sso?

**URL:** <https://community.auth0.com/t/how-to-change-user-id-attribute-when-use-saml-sso/151115>\
**Category:** Get Help\
**Tags:** connections, saml-enterprise-connection\
**Created:** [November 7, 2024, 7:46am UTC](https://community.auth0.com/t/how-to-change-user-id-attribute-when-use-saml-sso/151115 "2024-11-07T07:46:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xieyujie](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/xieyujie/32/61590_2.png) [@xieyujie](https://community.auth0.com/u/xieyujie)\
**Post date:** [November 7, 2024, 7:46am UTC](https://community.auth0.com/t/how-to-change-user-id-attribute-when-use-saml-sso/151115/1 "2024-11-07T07:46:37Z")

</div>

Hi all,  
Recently we encountered a problem. We used SAML SSO, but found that the user\_id in the token was prefixed with `samlp|saml-xxxx`. We want the user\_id to be just pure email without any prefix.  
I modified the configuration in the connection and set the user id attribute to [http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn). But the result shows that it does not work. The user\_id in the passed token still has the prefix. So I want to know, what should I do to achieve this goal?

 ![image](https://global.discourse-cdn.com/auth0/original/3X/c/8/c85aa74ac602a1efeceb73a893831af822714bad.png)

---

<div class="post-metadata">

**Author:** ![marybeth.hunter](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marybeth.hunter/32/61955_2.png) [@marybeth.hunter](https://community.auth0.com/u/marybeth.hunter)\
**Post date:** [November 7, 2024, 7:50pm UTC](https://community.auth0.com/t/how-to-change-user-id-attribute-when-use-saml-sso/151115/3 "2024-11-07T19:50:00Z")

</div>

Hi @xieyujie!

Welcome to the Auth0 Community!

Please see this article that discusses the `user_id` prefix: [Change User ID Used by Auth0 for SAML Connection](https://community.auth0.com/t/change-user-id-used-by-auth0-for-saml-connection/149495)

Let me know if you have any additional questions after giving that a read 🙂

Thanks,

Mary Beth

---

<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:** [November 21, 2024, 7:50pm UTC](https://community.auth0.com/t/how-to-change-user-id-attribute-when-use-saml-sso/151115/4 "2024-11-21T19:50:54Z")

</div>

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