# How to enable "Use ID instead of Email for Auth0 User ID " using terraform?

**URL:** <https://community.auth0.com/t/how-to-enable-use-id-instead-of-email-for-auth0-user-id-using-terraform/107997>\
**Category:** Get Help\
**Tags:** connections, saml-enterprise-connection\
**Created:** [May 29, 2023, 7:21am UTC](https://community.auth0.com/t/how-to-enable-use-id-instead-of-email-for-auth0-user-id-using-terraform/107997 "2023-05-29T07:21:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayank\_jadhav](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@mayank\_jadhav](https://community.auth0.com/u/mayank_jadhav)\
**Post date:** [May 29, 2023, 7:21am UTC](https://community.auth0.com/t/how-to-enable-use-id-instead-of-email-for-auth0-user-id-using-terraform/107997/1 "2023-05-29T07:21:23Z")

</div>

I want to enable the option "Use ID instead of Email for Auth0 User ID " using terraform. How can I doo it ?

 ![Screenshot 2023-05-29 123804](https://global.discourse-cdn.com/auth0/original/3X/8/d/8d834863c376c6866f7951af7f4725cc1d14c0ae.png)

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [June 5, 2023, 10:23am UTC](https://community.auth0.com/t/how-to-enable-use-id-instead-of-email-for-auth0-user-id-using-terraform/107997/3 "2023-06-05T10:23:05Z")

</div>

Hi @mayank_jadhav

Welcome to the Auth0 Community!

Can you share more details about what you are trying to achieve?

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![mayank\_jadhav](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@mayank\_jadhav](https://community.auth0.com/u/mayank_jadhav)\
**Post date:** [June 5, 2023, 11:11am UTC](https://community.auth0.com/t/how-to-enable-use-id-instead-of-email-for-auth0-user-id-using-terraform/107997/5 "2023-06-05T11:11:36Z")

</div>

Hi,

I am trying to create terraform code for auth0 enterprise connection with google workspace.  
But while creating the code, I don’t see any terraform argument for "Use ID instead of Email for Auth0 User ID " to enable it.  
as we have the boolean argument for “Enable Users API” in terraform documentation in “auth0\_connection google\_apps”  
I am attaching the screenshot of the argument that I want enable using terraform.  
As you can see in the screenshot “Enable Users API” can be enabled using terraform but in case of "Use ID instead of Email for Auth0 User ID " we don’t have any terraform argument to enable it.

So, do we have any other way to enable that option?

 ![Screenshot 2023-06-05 163659](https://global.discourse-cdn.com/auth0/original/3X/9/0/90809a3a246f5ab522e8aa6d900098e0d2b3b8db.png)

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [June 7, 2023, 10:42am UTC](https://community.auth0.com/t/how-to-enable-use-id-instead-of-email-for-auth0-user-id-using-terraform/107997/6 "2023-06-07T10:42:36Z")

</div>

Hi @mayank_jadhav

Thank you for your patience, I’ve contacted the Product team and searched for a solution to your issue. Terraform doesn’t mention this option in google apps social connection settings, but based on Docs from [here](https://auth0.com/docs/authenticate/identity-providers/enterprise-identity-providers/google-apps) and fetching social connection details with Management API, the name of the setting you are looking for is `"map_user_id_to_id": true`

By appending your existing Terraform new social configuration with this line of code, you should be able to change this setting.

Let me know if this works.

Thanks  
Dawid

---

<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:** [June 21, 2023, 10:42am UTC](https://community.auth0.com/t/how-to-enable-use-id-instead-of-email-for-auth0-user-id-using-terraform/107997/7 "2023-06-21T10:42:53Z")

</div>

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