# How to add google-oauth2 connection to a organization with management API?

**URL:** <https://community.auth0.com/t/how-to-add-google-oauth2-connection-to-a-organization-with-management-api/122101>\
**Category:** Get Help\
**Tags:** connections-management-api, management-api\
**Created:** [December 1, 2023, 2:49am UTC](https://community.auth0.com/t/how-to-add-google-oauth2-connection-to-a-organization-with-management-api/122101 "2023-12-01T02:49:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boss0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/boss0/32/48842_2.png) [@Boss0](https://community.auth0.com/u/Boss0)\
**Post date:** [December 1, 2023, 2:49am UTC](https://community.auth0.com/t/how-to-add-google-oauth2-connection-to-a-organization-with-management-api/122101/1 "2023-12-01T02:49:33Z")

</div>

I’ve automated creating an organization and assigning a connection to the organization with management API successfully, by the way, need to add a google-oauth2 connection to the organization automatically with management API as well.  
What’s the solution for it? I appreciate your help.

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [December 1, 2023, 10:04am UTC](https://community.auth0.com/t/how-to-add-google-oauth2-connection-to-a-organization-with-management-api/122101/3 "2023-12-01T10:04:47Z")

</div>

Hi @Boss0 !

Please grab the google-connection id and send the management API request as shown in this doc - [Enable Organization Connections](https://auth0.com/docs/manage-users/organizations/configure-organizations/enable-connections#management-api)

Please let us know any questions!

---

<div class="post-metadata">

**Author:** ![Boss0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/boss0/32/48842_2.png) [@Boss0](https://community.auth0.com/u/Boss0)\
**Post date:** [December 1, 2023, 12:24pm UTC](https://community.auth0.com/t/how-to-add-google-oauth2-connection-to-a-organization-with-management-api/122101/4 "2023-12-01T12:24:00Z")

</div>

@marcelina.barycka Thanks for the info. Is the google-connection ID the same for every tenant, or does it change? If it’s a fixed value for all tenants, I can work with that. But if it varies, I won’t be able to use it as I thought. Also, is there a management API that lets us fetch the Google connection ID?

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [December 1, 2023, 1:56pm UTC](https://community.auth0.com/t/how-to-add-google-oauth2-connection-to-a-organization-with-management-api/122101/5 "2023-12-01T13:56:33Z")

</div>

> [@Boss0](#):
>
> Is the google-connection ID the same for every tenant, or does it change?

@Boss0 - it is a unique, specific for your tenant value generated by Auth0. But the name for it is the same for all your tenants.

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

> [@Boss0](#):
>
> Also, is there a management API that lets us fetch the Google connection ID?

You can use the query param: `?name=google-oauth2` when calling [this](https://auth0.com/docs/api/management/v2/connections/get-connections) management API endpoint, to get the id:

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

---

<div class="post-metadata">

**Author:** ![Boss0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/boss0/32/48842_2.png) [@Boss0](https://community.auth0.com/u/Boss0)\
**Post date:** [December 1, 2023, 2:42pm UTC](https://community.auth0.com/t/how-to-add-google-oauth2-connection-to-a-organization-with-management-api/122101/6 "2023-12-01T14:42:41Z")

</div>

Thanks very much. @marcelina.barycka

---

<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:** [December 15, 2023, 2:43pm UTC](https://community.auth0.com/t/how-to-add-google-oauth2-connection-to-a-organization-with-management-api/122101/7 "2023-12-15T14:43:13Z")

</div>

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