--- title: "Google Directory" slug: "google-directory" updated: 2025-03-26T17:01:41Z published: 2025-03-26T17:01:41Z canonical: "docs.databee.buzz/google-directory" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.databee.buzz/llms.txt > Use this file to discover all available pages before exploring further. # Google Directory Google Directory provides detailed records of activities within the Google Workspace Directory, including user account management, group assignments, and changes to directory objects. For more information check the [official documentation](https://developers.google.com/admin-sdk/directory/v1/guides). **Integration Method:** API **Tables**: Entity Management (3004), Device Inventory Info (5001), User inventory Info (5003) This integration supports the following events. | **Event** | **Description** | | --- | --- | | Mobile Devices | Retrieves a list of all user-owned mobile devices for an account. | | Roles | Retrieves a list of all the roles in a domain. | | Users | Retrieves a list of all users in a domain. | | Deleted Users | Retrieves a list of deleted users in a domain. | This integration supports the following versions. | Google Directory API version | v1 | | --- | --- | > [!NOTE] > **Note:** > > Google Cloud Platform doesn’t follow a traditional versioning system. Instead, it is a continuously updates the cloud service. As of this document preparation, latest release was on [March 11, 2025](https://cloud.google.com/release-notes#March_11_2025). ## Prerequisites - The user should have access to the Google Cloud Portal with an account that has Administrator privileges. - The user should have a service account that can be used for Google OAuth2 authentication. - The user should have access to the DataBee console. # Configuration Overview 1. Generate a service account with the required scopes and its private key. 2. Add the [Google Directory](/user-manual/docs/google-directory#databee-configuration) in the DataBee console with the below parameters. | **DataBee Parameter** | **Google Cloud Parameter** | | --- | --- | | Client Email | Service account email id. | | Admin Email | Domain super admin email id. | | Private Key | Private key | ## Google Directory Configuration 1. Navigate to [Google Cloud](https://console.cloud.google.com), and log into the Google account, on your console click on your **organization name** in Navigation bar. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-uu1bn169.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 2. On **Select a resource** window click on **New Project**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-tglchbsd.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 3. On “New Project” window, enter your project name and click on **Create.** ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-48zqht93.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 4. Navigate to [**Google Cloud**](https://console.cloud.google.com). Click on the menu button on top left side. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-16tfb531.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 5. Navigate to **APIs and services** > **Enabled APIs & services**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-xlgtdbdq.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 6. Click on the **search bar**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-m5fj4qzs.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 7. Search **Admin SDK API** and then Select **Admin SDK API**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-qbwajxav.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 8. In Admin SDK API, click on the **ENABLE** button to enable the Admin SDK API. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-go0v6enp.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 9. Navigate to **IAM & Admin** > **Service account**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-xzg925ug.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 10. In Service account, select **CREATE SERVICE ACCOUNT**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-9bbdk1o1.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 11. In Create service account, name your **service account** and select **CREATE AND CONTINUE** and then click on **DONE**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-3c0ozu54.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 12. In Service accounts, navigate to your new service account name, and select your new service account name. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-q4jecern.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 13. In the Service account details page for your new service account, perform the following steps: 1. Navigate to the **KEYS** tab and click on **ADD KEY**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-plnonfip.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 2. Select **Create new key.** ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-qwyzm7nv.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 3. Select the **JSON** key type then, click on **CREATE**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-3wsxeebg.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 4. Save the key type as JSON file to your selected directory. Below is the sample private key. Copy and save the credentials from this file. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-nxl74cma.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) > [!NOTE] > Note: > > Your new public/private key pair is generated and downloaded to your machine, and it serves as the only copy of this key. You are responsible for storing it securely. 14. Navigate to [**admin.google.com**](https://admin.google.com) navigate to **Security** > **Access and data control** > **API controls.** ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-kxc7nhxn.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 15. In **API Controls**, navigate to **Domain wide delegation**, and select **Manage Domain Wide Delegation**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-u1elx3me.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 16. In **Manage Domain Wide Delegation**, select **Add new** to add a new client ID. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-u6ky59a6.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 17. In the Add a new client ID window, perform the following steps: 1. In the ‘Client ID’ field, paste the Client ID that is present under client_id key of the private key file of the service account**.** 2. In the ‘OAuth scopes’ (comma-delimited) field, add the following read-only scopes to fetch users, deleted users, roles, and mobile devices data: 1. [User Read Only](https://www.googleapis.com/auth/admin.directory.user.readonly) 2. [Mobile Read Only](https://www.googleapis.com/auth/admin.directory.device.mobile.readonly) 3. [Role Management Read Only](https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly) ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-jngx4uqx.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 3. Select **Authorize**. ## DataBee Configuration 1. Login to the DataBee UI, navigate to **Data** > **Data Feeds** and click the **Add New Data Feed** button. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-8n477pmw.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 2. Search for the **Google Directory** and click it as shown below. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-meenju6y.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 3. Click on the **API Ingest** option for collection method. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-00w4u8sc.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 4. Enter feed contact information and click **Next**. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-fq52psdi.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) 5. In the configuration page, confirm the following: - Authorization Method: Google OAuth2 - Client Email: enter the client_email got from the private key file of the service account created earlier. - Admin Email: enter the Email of the super admin user. - Private Key: get the private_key got from the private key file of the service account created earlier. - Copy the text between -----BEGIN PRIVATE KEY-----\n and \n-----END PRIVATE KEY----- and paste it in Private Key field. **e.g**. if private key is “-----BEGIN PRIVATE KEY-----\n1234567890\n-----END PRIVATE KEY-----” copy 1234567890 only. - Event Types: preselected for all the event types that integration pulls. ![](https://cdn.document360.io/04e48772-4346-44a4-aa69-043eca42257c/Images/Documentation/google-directory-mar2025-image-5e6w3e68.png?sv=2026-02-06&spr=https&st=2026-10-30T11%3A27%3A12Z&se=2026-10-30T12%3A27%3A12Z&sr=c&sp=r&sig=SLYd0isJJgNiMqF5Y5ZyWoyXrVoXigUQqxuYK8OYbbU%3D) > [!NOTE] > Note: > > A "super admin" refers to a user with the highest level of access, able to manage all aspects of your organization's Google Workspace and Cloud Identity account, including user accounts, services, and security settings. 6. Click **Submit.** ## Troubleshooting Tips - Ensure the Client Email, Admin Email and Private Keys are pasted correctly. Since you cannot get the private key file after the 1st time, re-create the key, download it on the safe location and reconfigure the DataBee feed - Ensure the Google Directory’s scopes are correct.