> ## Documentation Index
> Fetch the complete documentation index at: https://stackone-hub-docs-confluence-api-token-update.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Workspace

> Follow these steps to connect Google Workspace via the StackOne Hub successfully.

<Warning>
  Ensure that your Google Workspace account has Admin or Owner privileges.
</Warning>

If you've been directed to StackOne to integrate with Google Workspace, the following steps will help you understand the process and any necessary actions to configure a successful integration.

## Log in to Google Workspace

Log in to your Google Workspace Admin at [https://admin.google.com/login](https://admin.google.com/login)

<Frame>
  <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Log in" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image1.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=c64eba3272d12c9479588cd3e27e13f2" width="1022" height="468" data-path="images/googleworkspace/image1.png" />
</Frame>

## Get your Google Workspace Domain

Each connection will be associated with a single Google Workspace domain. If you wish to connect multiple domains, create a connection for each domain.

<Steps>
  <Step title="Navigate to Domains List">
    In the left navigation menu, click **Account > Domains > Manage domains**

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Navigate to Domains List" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image2.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=845de42c6495fef04ec9ef36ff2f6cd7" width="599" height="745" data-path="images/googleworkspace/image2.png" />
  </Step>

  <Step title="Copy Your Domain">
    Copy the **Domain** you wish to connect from the displayed list. Store this to be used in later steps.

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Copy Your Domain" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image3.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=3fc1bc8f5ac9b007f3689583ebae0bd5" width="1188" height="653" data-path="images/googleworkspace/image3.png" />
  </Step>
</Steps>

## Enable the Admin SDK API

Google requires manually enabling APIs for your account. The [Admin SDK API](https://developers.google.com/admin-sdk) provides the underlying endpoints for this IAM connection.

<Steps>
  <Step title="Go to Your Google Cloud Console">
    Go to your Google Cloud Console at [https://console.cloud.google.com/](https://console.cloud.google.com/)

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Navigate to the Google Cloud Console" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image4.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=d0c1da5e3029388f71792a079c02474f" width="1840" height="684" data-path="images/googleworkspace/image4.png" />
  </Step>

  <Step title="Navigate to the API Library">
    In the left navigation menu, click **APIs & Services > Library**

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Navigate to the API Library" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image5.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=6b983e459305972523f105fce057957c" width="467" height="480" data-path="images/googleworkspace/image5.png" />
  </Step>

  <Step title="Locate the Admin SDK API">
    Using the search bar, enter a search for *"admin sdk"*. Click the **Admin SDK API** result.

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Locate the Admin SDK API" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image6.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=8aa49a7e062a382c64d5754619f693d6" width="1836" height="533" data-path="images/googleworkspace/image6.png" />
  </Step>

  <Step title="Enable the Admin SDK API">
    Click the **Enable** button to enable the Admin SDK API for your organization.

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Enable the Admin SDK API" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image7.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=ad3d48780f2eb3929ff1a324ecaf7ec4" width="879" height="556" data-path="images/googleworkspace/image7.png" />
  </Step>
</Steps>

## Create New OAuth Client Credentials

This connection will authenticate on behalf of a registered OAuth Client in Google Workspace.

<Steps>
  <Step title="Navigate to Admin SDK API Credentials">
    In the Admin SDK API **Manage** page, scroll down to click **Credentials**.

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Navigate to Admin SDK API Credentials" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image8.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=e5e9256107e57a9857b8037b2371cadc" width="1100" height="835" data-path="images/googleworkspace/image8.png" />
    </Frame>
  </Step>

  <Step title="Create New OAuth Client ID">
    Under *Credentials*, click **Create Credentials > OAuth client ID**

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Create New OAuth Client ID" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image9.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=ebff03df5ce3fbfcd36434b34f9ca57b" width="1460" height="709" data-path="images/googleworkspace/image9.png" />
    </Frame>
  </Step>

  <Step title="Enter Application Details">
    Under *Create OAuth client ID*, enter the following details:

    * Application type: **Web application**
    * Name: Enter a name for the new application
    * Authorized redirect URIs: `https://api.stackone.com/connect/oauth2/googleworkspace_iam/callback`

    Then click the **Create** button at the bottom to proceed.

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Enter Application Details" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image10.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=131f4ef71e91a80214f24d125dd2391d" width="837" height="469" data-path="images/googleworkspace/image10.png" />
    </Frame>

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Enter Redirect URI" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image11.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=a7b5407ce06d72280187bf3084c9a747" width="596" height="348" data-path="images/googleworkspace/image11.png" />
    </Frame>
  </Step>

  <Step title="Copy Application Credentials">
    The new application's **Client ID** and **Client Secret** will be displayed. **Copy** these values and store them securely to be used in the next step.

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Copy Application Credentials" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image12.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=2dcc9f0abe8a719055839a4d81e0a353" width="598" height="631" data-path="images/googleworkspace/image12.png" />
    </Frame>
  </Step>
</Steps>

## Configure OAuth Consent

Google requires configuring a consent screen to be displayed when granting application access to your account.

<Steps>
  <Step title="Go to OAuth Consent Screen Setup">
    After enabling the Admin SDK API, click **APIs & Services > OAuth consent screen** in the left navigation menu.

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Go to OAuth Consent Screen Setup" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image13.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=99dc8c27de15c62bdddb48fa972a5dbb" width="288" height="308" data-path="images/googleworkspace/image13.png" />
  </Step>

  <Step title="Select User Type">
    Under *User Type* select **Internal**, then click the **Create** button.

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Select User Type" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image14.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=f04c6223e9cda5a69b0c39153c7f2617" width="896" height="597" data-path="images/googleworkspace/image14.png" />
  </Step>

  <Step title="Enter Application Information">
    Under *Edit app registration*, enter the following required details:

    *App information*

    * App name: Enter a name for the new application
    * User support email: Your Google Workspace account email

    *Authorized domains*

    * Authorized domain 1: Enter the **Domain** you copied in a [previous step](#get-your-google-workspace-domain). *Example: my-org.com*

    *Developer contact information*

    * Email addresses: Your Google Workspace account email

    Then click the **Save and Continue** button to proceed.

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Enter Application Information" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image15.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=1c22ae81ce454266e9afcabd5ac86c78" width="674" height="481" data-path="images/googleworkspace/image15.png" />
  </Step>

  <Step title="Select Required Application Scopes">
    Click the **Add or Remove Scopes** button, and a popout window will appear on the right titled *Update selected scopes*.

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Add Scopes Button" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image16.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=b486a942e6becfcbf6e07fd6555758d2" width="608" height="316" data-path="images/googleworkspace/image16.png" />

    Enable the following scopes which are required for full functionality of this integration:

    * `https://www.googleapis.com/auth/admin.directory.group.readonly`
    * `https://www.googleapis.com/auth/admin.directory.group.member.readonly`
    * `https://www.googleapis.com/auth/admin.directory.user.readonly`
    * `https://www.googleapis.com/auth/admin.directory.orgunit.readonly`
    * `https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly`

    You can copy and paste each scope into the **Filter** bar to quickly locate them.

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Select Scopes" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image17.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=382bf2ed90c356cd28df9d83fddadb9b" width="829" height="368" data-path="images/googleworkspace/image17.png" />

    Once all five scopes have been enabled, click the **Update** button to proceed.

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Update Scopes Button" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image18.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=ebedf171f937b75d31f07bdc15b31995" width="907" height="719" data-path="images/googleworkspace/image18.png" />
  </Step>

  <Step title="Complete Scope Selection">
    Confirm that each of the required scopes is listed under *Your sensitive scopes*.

    Then click the **Save and Continue** button to proceed.

    <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Complete Scope Selection" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image19.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=0de6bda6e2919d5c8d14d4b4bb635696" width="682" height="850" data-path="images/googleworkspace/image19.png" />
  </Step>
</Steps>

## Connecting with StackOne

<Steps>
  <Step title="Enter Credentials">
    Upon reaching the Link Account page, enter the credentials from the previous steps:

    * **Domain**
    * **Client ID**
    * **Client Secret**
    * **Scopes** - If you selected only the required scopes in the previous steps, leave the default value for this field. Otherwise, enter the space-separated list of scopes granted to your application.

    Proceed by clicking the Connect button.

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Enter Credentials" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image20.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=313990687c4cbf5a0e29cef29c39166f" width="431" height="679" data-path="images/googleworkspace/image20.png" />
    </Frame>
  </Step>

  <Step title="Grant OAuth Application Consent">
    A window will appear and may prompt you to log in to your Google Workspace account.

    After logging in, you will be displayed the OAuth consent screen you configured in a [previous step](#configure-oauth-consent).

    Click the **Allow** button to grant the application access to your Google Workspace account.

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Grant OAuth Application Consent" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/6QOxZsBfCtSHWqb3/images/googleworkspace/image21.png?fit=max&auto=format&n=6QOxZsBfCtSHWqb3&q=85&s=f4495754bfa462e5581cf9cd9919e5ae" width="854" height="729" data-path="images/googleworkspace/image21.png" />
    </Frame>
  </Step>
</Steps>

<br />

Congratulations, you're all set! If you face any issues with the steps mentioned above,
please contact us by emailing [integrations@stackone.com](mailto:integrations@stackone.com). We're always here to assist you!

## Available data

This integration has the following [IAM Resources](https://docs.stackone.com/reference/getting-started-with-your-api) available from the provider:

<ul>
  <li>Users</li>
  <li>Groups</li>
  <li>Roles</li>
</ul>

## Useful Links

<Card title="Google Workspace Admin SDK API Scopes" icon="link" href="https://developers.google.com/identity/protocols/oauth2/scopes#admin-directory">
  [https://developers.google.com/identity/protocols/oauth2/scopes#admin-directory](https://developers.google.com/identity/protocols/oauth2/scopes#admin-directory)
</Card>
