# Creating users in terraform needs the client 'id' which is not available

**URL:** <https://community.auth0.com/t/creating-users-in-terraform-needs-the-client-id-which-is-not-available/57462>\
**Category:** Get Help\
**Tags:** terraform, client, clients\
**Created:** [February 5, 2021, 5:37pm UTC](https://community.auth0.com/t/creating-users-in-terraform-needs-the-client-id-which-is-not-available/57462 "2021-02-05T17:37:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![arthuston-abacus](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/arthuston-abacus/32/12742_2.png) [@arthuston-abacus](https://community.auth0.com/u/arthuston-abacus)\
**Post date:** [February 5, 2021, 5:37pm UTC](https://community.auth0.com/t/creating-users-in-terraform-needs-the-client-id-which-is-not-available/57462/1 "2021-02-05T17:37:08Z")

</div>

We use an m2m client to access the management APIs during a terraform deployment. We would like to create users in a connection, so we need to add the client ‘id’ (not the ‘client\_id’) in auth0\_connection.enabled\_clients, but the ‘id’ is not visible in the application console page or elsewhere.

How do we get the client id so we can use it?

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [February 8, 2021, 2:00pm UTC](https://community.auth0.com/t/creating-users-in-terraform-needs-the-client-id-which-is-not-available/57462/3 "2021-02-08T14:00:48Z")

</div>

Hi @arthuston-abacus,

The property `enabled_clients` passed to [POST](https://auth0.com/docs/api/management/v2#!/Connections/post_connections)[/api/v2/connections](https://auth0.com/docs/api/management/v2#!/Connections/post_connections) refers to all of your tenant’s applications which support a connection.

A connection is the relationship between Auth0 and a source of users. For example, `google-oauth2` is a social connection that allows Auth0 to obtain profile/email info from gmail users.

To create users in a connection, you can use the [POST](https://auth0.com/docs/api/management/v2#!/Users/post_users)[/api/v2/users](https://auth0.com/docs/api/management/v2#!/Users/post_users) endpoint and pass the connection name.

For example, this request will create a user for the connection named “Username-Password-Authentication”:

```auto
{
  "email": "john.doe@gmail.com",
  "user_metadata": {},
  "blocked": false,
  "email_verified": false,
  "app_metadata": {},
  "given_name": "John",
  "family_name": "Doe",
  "name": "John Doe",
  "nickname": "Johnny",
  "picture": "https://secure.gravatar.com/avatar/15626c5e0c749cb912f9d1ad48dba440?s=480&r=pg&d=https%3A%2F%2Fssl.gstatic.com%2Fs2%2Fprofiles%2Fimages%2Fsilhouette80.png",
  "user_id": "abc",
  "connection": "Username-Password-Authentication",
  "password": "supersecret123!@#",
  "verify_email": false,
  "username": "johndoe"
}

```

---

<div class="post-metadata">

**Author:** ![arthuston-abacus](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/arthuston-abacus/32/12742_2.png) [@arthuston-abacus](https://community.auth0.com/u/arthuston-abacus)\
**Post date:** [February 12, 2021, 7:56pm UTC](https://community.auth0.com/t/creating-users-in-terraform-needs-the-client-id-which-is-not-available/57462/4 "2021-02-12T19:56:54Z")

</div>

Hi Stephanie,  
Thank you for your help.

The property `enabled_clients` passed to [POST](https://auth0.com/docs/api/management/v2#!/Connections/post_connections)[/api/v2/connections](https://auth0.com/docs/api/management/v2#!/Connections/post_connections) refers to all of your tenant’s applications which support a connection. requires the ‘id’, not the ‘client\_id’. Are these the same? If not, where do I get the ‘id’, it is not visible in the UI.

---

<div class="post-metadata">

**Author:** ![arthuston-abacus](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/arthuston-abacus/32/12742_2.png) [@arthuston-abacus](https://community.auth0.com/u/arthuston-abacus)\
**Post date:** [February 22, 2021, 10:07pm UTC](https://community.auth0.com/t/creating-users-in-terraform-needs-the-client-id-which-is-not-available/57462/5 "2021-02-22T22:07:28Z")

</div>

Using the client\_id worked, thank you.

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [February 23, 2021, 10:38am UTC](https://community.auth0.com/t/creating-users-in-terraform-needs-the-client-id-which-is-not-available/57462/6 "2021-02-23T10:38:20Z")

</div>

(Sorry for the delay–I had my reply saved about Client ID, but I must not have submitted it 😞.)

Yes, the Client ID is what it’s expecting!

---

<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:** [March 10, 2021, 10:39am UTC](https://community.auth0.com/t/creating-users-in-terraform-needs-the-client-id-which-is-not-available/57462/7 "2021-03-10T10:39:02Z")

</div>

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