> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Admin SDK Reports Connector

<Warning>
  ********Important:******** Due to Google’s change in allowing Domo connectors to use OAuth authentication, all users must now use service account key authentication to create new data connections. To create new Google Admin SDK Reports DataSets, use this connector. All pre-existing Google Admin SDK Reports DataSets will continue to run normally.
</Warning>

## Intro

To learn more about Google's Reports API, visit their page ([https://developers.google.com/admin-.../v1/reference/](https://developers.google.com/admin-sdk/reports/v1/reference/ "https://developers.google.com/admin-sdk/reports/v1/reference/") ).

You connect to Google Admin SDK Reports in the Data Center. This topic discusses the fields and menus that are specific to the Google Admin SDK Reports connector user interface. General information for adding DataSets, setting update schedules, and editing DataSet information is discussed in [Adding a DataSet Using a Data Connector](https://domo-support.domo.com/s/article/360042926274?language=en_US "Adding a DataSet Using a Data Connector").

## Prerequisites

To connect to a Google service account, you must have a Google service account JSON key and Service account username.

#### To generate a new service account and a key, do the following:

1. Login into
   [Google Cloud Console](https://console.cloud.google.com/ "Google Cloud Console").

2. Click on
   **APIs & Services > Credentials**.

<Frame>
  <img alt="API_Service-Creds.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/2K-MJunolF8arvf9/images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1Y.png?fit=max&auto=format&n=2K-MJunolF8arvf9&q=85&s=3f1793f410674a956d75116d2209d1a3" width="266" height="356" data-path="images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1Y.png" />
</Frame>

3. Click Create
   **Credentials > Service account**.

<Frame>
  <img alt="Create_Cred-Service_accnt.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/2K-MJunolF8arvf9/images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1d.png?fit=max&auto=format&n=2K-MJunolF8arvf9&q=85&s=da504dcdaeb296d3786afc39eed78d6c" width="849" height="273" data-path="images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1d.png" />
</Frame>

4. In the Create service account pane, enter a name and description for the service account, and click
   **Create and continue**.

5. In the
   **Grant this service account access to the project** section, select **Project > Owner** from the **Select a role** dropdown.

<Frame>
  <img alt="Project_Owner.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/2K-MJunolF8arvf9/images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1b.png?fit=max&auto=format&n=2K-MJunolF8arvf9&q=85&s=10f2e4de04da12591d6ebe5be3fb7035" width="267" height="352" data-path="images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1b.png" />
</Frame>

6. Click
   **Done**.

7. To create a new JSON key, in the
   **Service accounts** pane, click the three dots (expansion menu) and select **Manage keys**.

<Frame>
  <img alt="Manage_Keys.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/2K-MJunolF8arvf9/images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1c.png?fit=max&auto=format&n=2K-MJunolF8arvf9&q=85&s=40ca0a013164ae37b528cba475e14eb4" width="999" height="299" data-path="images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1c.png" />
</Frame>

8. In the
   **Keys** section, click **Add Key > Create new key**.

<Frame>
  <img alt="Keys_Create_new_key.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/2K-MJunolF8arvf9/images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1f.png?fit=max&auto=format&n=2K-MJunolF8arvf9&q=85&s=b6ce2773654b1bf91a1495821d38e60f" width="508" height="368" data-path="images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1f.png" />
</Frame>

9. Select
   **JSON** as the key type and click **Create**.

<Frame>
  <img alt="select_JSON.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/2K-MJunolF8arvf9/images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1e.png?fit=max&auto=format&n=2K-MJunolF8arvf9&q=85&s=a31f873ad13d9d476a012b328a69da8b" width="531" height="316" data-path="images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1e.png" />
</Frame>

10. Click
    **Create**.

A private key will be saved to your computer.

#### To Enable domain-wide delegation to the service key

1. Locate the newly-created service account in the table. Under **Actions**, click the three dots (expansion menu) and click **Manage Details**.
2. In the service account details, click and expand **Show domain-wide delegation**, then ensure the **Enable Google Workspace Domain-wide Delegation** checkbox is checked.

<Frame>
  <img alt="Enable_Google_wide_checkbox.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/2K-MJunolF8arvf9/images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1Z.png?fit=max&auto=format&n=2K-MJunolF8arvf9&q=85&s=f0557595a319c978948063db52172f82" width="721" height="499" data-path="images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1Z.png" />
</Frame>

3. Click **Save** to update the service account, and return to the table of service accounts. A new column, **Domain-wide delegation**, can be seen.
4. Click **View Client ID**, to obtain and make a note of the client ID.

#### To delegate domain-wide authority to your service account

To access user data on a Google Workspace domain, the service account that you created needs to be granted access by a super administrator for the domain. For more information about domain-wide delegation, see [Control Google Workspace API access with domain-wide delegation](https://support.google.com/a/answer/162106?hl=en "Control Google Workspace API access with domain-wide delegation").

1. From your Google Workspace domain’s
   [Admin console](https://accounts.google.com/ServiceLogin/webreauth?continue=https%3A%2F%2Fadmin.google.com%2F\&authuser=0\&passive=3600\&osid=1\&flowName=GlifWebSignIn\&flowEntry=ServiceLogin "Admin console"), go to **Main menu > Security > API controls**.

2. In the
   **Domain wide delegation** pane, select **Manage Domain Wide Delegation**.

3. Click
   **Add new**.

<Frame>
  <img alt="Domain_wide_delegation.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/2K-MJunolF8arvf9/images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1g.png?fit=max&auto=format&n=2K-MJunolF8arvf9&q=85&s=8eb08dfbbbd07e4bb0d7e8ad0b56e238" width="1095" height="479" data-path="images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1g.png" />
</Frame>

4. In the
   **Client ID** field, enter the client ID obtained from the service account creation steps above.

<Frame>
  <img alt="add_client.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/2K-MJunolF8arvf9/images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1a.png?fit=max&auto=format&n=2K-MJunolF8arvf9&q=85&s=3f89cfe9e8ec2254ca80c5ba704f104f" width="276" height="245" data-path="images/kb/ka0Vq00000014Ub-00N5w00000Ri7BU-0EM5w000005vO1a.png" />
</Frame>

5. In the
   **OAuth Scopes** field, enter a comma-delimited list of the scopes required for your application (for a list of possible scopes, see Authorize requests).

For example, if you need domain-wide access to activity reports, enter:

* [https://www.googleapis.com/auth/admin.reports.audit.readonly](https://www.googleapis.com/auth/admin.reports.audit.readonly)
* [https://www.googleapis.com/auth/admin.reports.usage.readonly](https://www.googleapis.com/auth/admin.reports.usage.readonly)

6. Click **Authorize**.

## Connecting to Your Google Admin SDK Reports Account

This section enumerates the options in the **Credentials** and **Details** panes in the Google Admin SDK Reports Connector page. The components of the other panes in this page, **Scheduling** and **Name & Describe Your DataSet,** are universal across most connector types and are discussed in greater length in [Adding a DataSet Using a Data Connector](https://domo-support.domo.com/s/article/360042926274?language=en_US "Adding a DataSet Using a Data Connector").

### Credentials Pane

This pane contains fields for entering credentials to connect to a Google service account. The following table describes what is needed for each field:

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:195;a"><thead><tr><th colspan="1" rowspan="1"><p> Field </p></th><th colspan="1" rowspan="1"><p> Description </p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p> Service Account Key JSON </p></td><td colspan="1" rowspan="1"><p> Copy and paste the JSON for your Google service account key. For information about creating a key, see "Prerequisites," above. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Service Account User </p></td><td colspan="1" rowspan="1"><p> Enter your service account username. Example: <a href="mailto:es@xyz.com"> [es@xyz.com](mailto:es@xyz.com) </a></p></td></tr></tbody></table>

Once you have entered a valid key, you can use the same account any time you go to create a new Google Admin SDK Reports DataSet. You can manage connector accounts in the ********************************Accounts******************************** tab in the Data Center. For more information about this tab, see [Managing User Accounts for Connectors](https://domo-support.domo.com/s/article/360042926054?language=en_US "Managing User Accounts for Connectors").

### Details Pane

This pane contains a primary **Reports** menu, along with other menus for selecting your timeframe.

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:195;a"><thead><tr><th colspan="1" rowspan="1"><p> Menu </p></th><th colspan="1" rowspan="1"><p> Description </p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p> Report </p></td><td colspan="1" rowspan="1"><p> Select the Google Admin SDK Reports report you want to run. The following reports are available: </p><table border="1" cellpadding="1" cellspacing="1"><tbody><tr><td colspan="1" rowspan="1"><p> Customer Usage </p></td><td colspan="1" rowspan="1"><p> Returns Google Apps service activities for the account's users. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Google Admin Activity </p></td><td colspan="1" rowspan="1"><p> Returns information about Admin Console activities for all of the account's administrators. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Google Drive Activity </p></td><td colspan="1" rowspan="1"><p> Returns information about how the account's users manage, modify, and share their Google Drive documents. </p></td></tr><tr><td colspan="1" rowspan="1"><p> User Usage </p></td><td colspan="1" rowspan="1"><p> Returns Google Apps service activities for the account's users. (Data for some dates may be left blank until it becomes available.) </p></td></tr></tbody></table></td></tr><tr><td colspan="1" rowspan="1"><p> Duration </p></td><td colspan="1" rowspan="1"><p> Select whether you want to pull data for a specific date or a date range. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Report Date </p></td><td colspan="1" rowspan="1"><p> Select whether the report data is for a specific date or for a relative number of days back from today. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Select Specific Date </p></td><td colspan="1" rowspan="1"><p> Select the date for the report. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Days Back </p></td><td colspan="1" rowspan="1"><p> Enter the number of past days that should appear in the report. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Start Date </p></td><td colspan="1" rowspan="1"><p> Specify whether the first date in your date range is a specific or relative date. You select the last date in your range in <b> End Date </b>. </p></td></tr><tr><td colspan="1" rowspan="1"><p> End Date </p></td><td colspan="1" rowspan="1"><p> Specify whether the second date in your date range is a specific or relative date. You select the first date in your range in <b> Start Date </b>. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Select Specific Start Date </p></td><td colspan="1" rowspan="1"><p> Select the first date in your date range. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Select Specific End Date </p></td><td colspan="1" rowspan="1"><p> Select the second date in your date range. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Days Back to Start From </p></td><td colspan="1" rowspan="1"><p> Enter the number of the farthest day back that should be represented in the report. Combine with <b> Days Back to End At </b> to create a range of represented days. </p><p> For example, if you entered <span class="mt-font-courier-new"> 10 </span> for <b> Days Back to Start From </b> and <span class="mt-font-courier-new"> 5 </span> for <b> Days Back to End At </b>, the report would contain data for 10 days ago up until 5 days ago. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Days Back to End At </p></td><td colspan="1" rowspan="1"><p> Enter the number of the most recent day back that should be represented in the report. Combine with <b> Days Back to Start From </b> to create a range of represented days. </p><p> For example, if you entered <span class="mt-font-courier-new"> 10 </span> for <b> Days Back to Start From </b> and <span class="mt-font-courier-new"> 5 </span> for <b> Days Back to End At </b>, the report would contain data for 10 days ago up until 5 days ago. </p></td></tr></tbody></table>

### Other Panes

For information about the remaining sections of the connector interface, including how to configure scheduling, retry, and update options, see [Adding a DataSet Using a Data Connector](https://domo-support.domo.com/s/article/360042926274?language=en_US "Adding a DataSet Using a Data Connector").
