# Google Workspace Directory Service

This document explains the process of adding your Google Workspace tenant to Nightfall to enable Directory Sync. Once you add Google Workspace to Nightfall, you can sync users and user groups data from Google Workspace to Nightfall. To get an overview of the Directory Sync feature in Nightfall, you can read [this article](https://help.nightfall.ai/nightfall_settings/directory_sync) and then proceed with this document.&#x20;

To install Google Directory:

1. Click the **Settings** button in Nightfall.&#x20;

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2Fxgq9gt7LXyMw4j9JfibI%2Fimage.png?alt=media&#x26;token=528c5b03-6e73-495d-807c-49e052aa24ea" alt=""><figcaption></figcaption></figure>

2. Click the **Directory Sync** tab.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FKFrumwvRDMR9Y3eQ5WAM%2Fimage.png?alt=media&#x26;token=6bae4f83-8289-4be0-ba0a-c7fd036c95a7" alt=""><figcaption></figcaption></figure>

3. Click **Add directory**.&#x20;

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2Fa1xNvce4yNVFvcxfTSyt%2Fimage.png?alt=media&#x26;token=044f7ee6-4ea6-4120-9bcb-eb4a7475159b" alt=""><figcaption></figcaption></figure>

4. Select **Google Workspace** as the identity provider.&#x20;

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FAQY1GjH0k5lFNHTxJg82%2Fimage.png?alt=media&#x26;token=4c4ef31b-196d-4eb0-aaa4-df5a1f85ed18" alt=""><figcaption></figcaption></figure>

5. Copy the **Client ID** and **OAuth Scope ID**. Store these values in a secure place. You require them in the further steps.&#x20;

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2Fvw2FxtkpN6rWiBfT0FXW%2Fimageedit_19_8537558229.jpg?alt=media&#x26;token=911bc2f4-c8d9-4d02-968a-18e27d66111a" alt=""><figcaption></figcaption></figure>

6. Login to your Google Workspace with an admin account.
7. Click the menu icon.
8. Select **Admin**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2F9FWwTibs80Qo22vARFpO%2Fimage.png?alt=media&#x26;token=69092f0c-b446-4d35-98fe-8f8778fbaa83" alt=""><figcaption></figcaption></figure>

9. In the Admin console left pane, expand **Security** and then expand **Access and data control**.
10. Click **API controls**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FN8w0ld2iiuTXEuT19XAU%2Fimage.png?alt=media&#x26;token=38492208-f946-469f-b49d-49515b60e3a6" alt=""><figcaption></figcaption></figure>

11. Click **MANAGE DOMAIN WIDE DELEGATION** under **Domain wide delegation**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2Fg8TYvO0PVzez7IDD45rn%2Fimage.png?alt=media&#x26;token=20b30913-c212-449c-a226-e5a3c7404003" alt=""><figcaption></figcaption></figure>

12. Click **Add New**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FwpiwjYQ3GaYdtzhoR4YV%2Fimage.png?alt=media&#x26;token=ad6d0066-b6b9-4ca7-a399-bc5b7e070424" alt=""><figcaption></figcaption></figure>

13. Paste the **Client ID** copied from the Nightfall app, in the **Client ID** field.
14. Paste the **Scopes ID** copied from the Nightfall app, under **OAuth Scope** fiel&#x64;**.** Use comma to add multiple scope IDs.&#x20;
15. Click **AUTHORIZE.**&#x20;

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FwXRBxVCQFUkoN5KUYCzJ%2Fimage.png?alt=media&#x26;token=5a1dafcb-ef17-4f3c-afe9-9d0725f50db3" alt=""><figcaption></figcaption></figure>

16. Return to the Nightfall app and click **Continue**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2F8SISQ9V8mnDBOafKjUD1%2Fimageedit_19_4340614910.jpg?alt=media&#x26;token=fca692c9-f8e9-4928-a43e-bfd00b463e86" alt=""><figcaption></figcaption></figure>

17. Click **Connect**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FE2N8q0arTgd9rvH4wTt0%2Fimage.png?alt=media&#x26;token=6df87245-d8e9-401d-8362-7e555b37833d" alt=""><figcaption></figcaption></figure>

Once the setup is completed, Nightfall displays the list of active and inactive users in your Google Workspace. Nightfall syncs with your Identity and Access Provider every four hours. Also, you can manually sync once every hour. To sync data manually, click the ellipsis menu and select **Refresh.**

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FuCBGniHhIt2LOf8XKIH8%2Fimage.png?alt=media&#x26;token=fbf00f72-ca9d-42be-bbaa-42925e73eeee" alt=""><figcaption></figcaption></figure>

Currently, once registered you cannot unregister an Identity and Access Provider from Nightfall. If you wish to unregister your Identity and Access Provider, please contact Nightfall support.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.nightfall.ai/nightfall_settings/directory_sync/google_workspace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
