# Which client\_id is required for terraform provider

**URL:** <https://community.auth0.com/t/which-client-id-is-required-for-terraform-provider/59877>\
**Category:** Get Help\
**Tags:** terraform\
**Created:** [March 22, 2021, 3:56pm UTC](https://community.auth0.com/t/which-client-id-is-required-for-terraform-provider/59877 "2021-03-22T15:56:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevorc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/trevorc/32/13766_2.png) [@trevorc](https://community.auth0.com/u/trevorc)\
**Post date:** [March 22, 2021, 3:56pm UTC](https://community.auth0.com/t/which-client-id-is-required-for-terraform-provider/59877/1 "2021-03-22T15:56:19Z")

</div>

Hi,

I am attempting to setup a client and api via terraform. The terraform provider requires a client\_id and client\_secret. Which client/secret is this? I have tried the tenant global clientid and the Auth0 Management api client (which is default when creating a tenant I believe). The latter gives my a 401 “Invalid Token”.

What am I missing? All of this is being called via a remote build server in Azure Devops.

Thanks.  
trevor

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [March 23, 2021, 5:07pm UTC](https://community.auth0.com/t/which-client-id-is-required-for-terraform-provider/59877/2 "2021-03-23T17:07:47Z")

</div>

Hi @trevorc,

Welcome to the Community. You need to create a machine-to-machine client specifically for Terraform, and give that client access to the Management API.

 ![Screen Shot 2021-03-23 at 13.06.42](https://global.discourse-cdn.com/auth0/original/3X/2/9/2938ba25a477837e235a216b7a4cc049e900dcd5.png)

---

<div class="post-metadata">

**Author:** ![trevorc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/trevorc/32/13766_2.png) [@trevorc](https://community.auth0.com/u/trevorc)\
**Post date:** [March 23, 2021, 6:18pm UTC](https://community.auth0.com/t/which-client-id-is-required-for-terraform-provider/59877/3 "2021-03-23T18:18:50Z")

</div>

Thank you Mark. I discovered a similar approach in that the Mgmt Api app did not have all the permissions I thought it did. Your solution however, reminded me of the better way to do things and make applications specific to the task they serve. Thank you very much.

t

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [March 24, 2021, 11:55am UTC](https://community.auth0.com/t/which-client-id-is-required-for-terraform-provider/59877/4 "2021-03-24T11:55:27Z")

</div>

Teamwork makes the dreamwork!

---

<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 8, 2023, 7:07am UTC](https://community.auth0.com/t/which-client-id-is-required-for-terraform-provider/59877/5 "2023-09-08T07:07:59Z")

</div>

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