website/src/app/kb/directory-sync/google/readme.mdx
import Alert from "@/components/DocsAlert"; import PlanBadge from "@/components/PlanBadge"; import SupportOptions from "@/components/SupportOptions";
<PlanBadge plans={["enterprise"]}>
On Enterprise plans, Firezone can automatically synchronize users, groups, and organizational units from your Google Workspace directory. This eliminates the need to manually create and manage users in Firezone. You can add multiple Google directories to sync from different Workspace domains.
Firezone uses Google's Admin SDK to read users, groups, and organizational units from your Google Workspace directory. To enable this, you'll need to authorize Firezone's service account to access your directory using domain-wide delegation.
Domain-wide delegation allows a service account to impersonate users in your domain and access data on their behalf. Firezone uses this to impersonate a Google Workspace admin and read directory information.
A Super Admin must complete this step. After domain-wide delegation is configured, any Firezone admin in your account can complete the remaining steps below.
116063234931746680875https://www.googleapis.com/auth/admin.directory.orgunit.readonly,
https://www.googleapis.com/auth/admin.directory.group.readonly,
https://www.googleapis.com/auth/admin.directory.user.readonly,
https://www.googleapis.com/auth/admin.directory.customer.readonly
Settings -> Directory Sync.Enter the Impersonation Email in the Firezone setup form. This is the email address of a Google Workspace admin that Firezone will impersonate when accessing the Admin SDK.
<Alert color="info"> <div> <p>**Why is an impersonation email required?**</p> <p> Google's Admin SDK API can only be accessed by users, not service accounts directly. Domain-wide delegation allows Firezone's service account to impersonate a user (the impersonation email) when making API calls. The impersonated user must have admin privileges to read directory data. </p> <p> See [Google's documentation on domain-wide delegation](https://developers.google.com/identity/protocols/oauth2/service-account#delegatingauthority) for more details. </p> </div> </Alert>The impersonation email should be:
Use Group sync mode to control which Google groups are imported into Firezone:
[firezone-sync]firezone-syncIn Filtered groups mode, nested groups are also synced. For example, create
[email protected] and add any other groups and/or users you want to
sync.
Click Verify Now to test the connection. Firezone will attempt to impersonate the specified admin and read your directory.
If successful, you'll see a confirmation message. Click Save to complete the setup.
Directory sync runs automatically every 2 hours. To trigger a sync immediately,
click the Sync Now button on the directory card in
Settings -> Directory Sync.
This typically means domain-wide delegation is not configured correctly. Verify:
116063234931746680875) is entered exactly as shown.The impersonation email must be a Google Workspace admin account. It cannot be: