> For the complete documentation index, see [llms.txt](https://help.nightfall.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.nightfall.ai/nightfall_settings/directory_sync/google_workspace.md).

# 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](/nightfall_settings/directory_sync.md) and then proceed with this document.&#x20;

To install Google Directory:

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

<figure><img src="/files/pjfmlVFzQE3WjSV6XHbl" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/GTQztl95QRzTfpyE3kJB" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/Jb0gC3E07GfrO4mwdB61" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/gGk2cXxYE2YxGXbeIfPg" 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="/files/95Vk4BCgN9afVUuQB7h7" 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="/files/cXnfDNoL7y6M5ucYiQkH" 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="/files/b2tGK38eJzTip1FLt05g" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/E4TkfkJB519INpveM09Z" alt=""><figcaption></figcaption></figure>

12. Click **Add New**.

<figure><img src="/files/PbWDVovvLpGVjKwIqQI7" 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="/files/1lLSTLOHBPmP9Z9dZexR" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/nSsL6XMIYxQuugnTpE1E" alt=""><figcaption></figcaption></figure>

17. Click **Connect**.

<figure><img src="/files/25MOa1TymAb9mlGe6JFw" 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="/files/R8rmRVjUYJdqevVPHwzA" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
