Before you start
- Before you start: turn on MFA in Seven21. Owners and Admins need an authenticator app before Directories Sync will accept a connect. Open Account (avatar menu) or /app/mfa and finish setup (including saving recovery codes).
- Who: Seven21 Owner or Admin, plus a Google Workspace super admin who can open the Admin console and a Google Cloud project.
- Time: About 20 to 30 minutes the first time.
- Seven21 will read: Directory users, groups, org units, and sign-in activity when reports are granted.
- Access: read-only for directory sync. Seven21 does not remove people in the provider admin console.
Import employees with a service account that has domain-wide delegation.
Turn on MFA in Seven21
- Owners and Admins need an authenticator app before Directories Sync will accept a connect.
- Open Account (avatar menu) or /app/mfa, finish setup, and save recovery codes.
Create a Google Cloud service account
- Open Google Cloud Console and sign in with an account that can manage a project for your company.
- Create or select a project (project picker at the top).
- Open the navigation menu, then APIs & Services, then Library. Search for Admin SDK API and click Enable.
- Open IAM & Admin, then Service Accounts. Click Create service account.
- Enter a name (for example, Seven21 directory). Click Create and continue, then Done. You do not need Google Cloud project roles for this directory connection.
- Open the new service account. Under Advanced settings, copy the Client ID (also shown as Unique ID on Details, and as client_id in the JSON key).
- Open the Keys tab, Add key, Create new key, choose JSON, then Create. Your browser downloads a .json file once. Keep it safe.
Client ID: Paste the numeric Client ID into Google Admin domain-wide delegation, not the service account email.
Authorize domain-wide delegation
- Open the Google Admin console as a Workspace super admin.
- Go to Security, then Access and data control, then API controls, then Manage Domain-wide Delegation (wording may say Manage Domain Wide Delegation).
- Click Add new. In Client ID, paste the Client ID from the service account.
- In OAuth scopes, paste the exact comma-separated list below, then Authorize.
OAuth scopes (paste into domain-wide delegation)
https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.group.readonly,https://www.googleapis.com/auth/admin.directory.orgunit.readonly,https://www.googleapis.com/auth/admin.reports.audit.readonlyOptional later: For account provisioning only, add https://www.googleapis.com/auth/admin.directory.user, then reconnect. License SKU sync may also need https://www.googleapis.com/auth/apps.licensing; connect still works without it.
Connect in Seven21
- Open Directories Sync in the Admin group of the left sidebar.
- On the Google Workspace card, click Connect (or Manage if reconnecting).
- Enter a Workspace admin email the service account can impersonate.
- Paste the full service account JSON, or upload the .json file.
- Click Test and connect. On success, Seven21 stores the key encrypted and opens Import preview. Nothing is saved to People until you Import.
Permissions checklist
- https://www.googleapis.com/auth/admin.directory.user.readonly: Directory import
- https://www.googleapis.com/auth/admin.directory.group.readonly
- https://www.googleapis.com/auth/admin.directory.orgunit.readonly
- https://www.googleapis.com/auth/admin.reports.audit.readonly: Sign-in activity
- https://www.googleapis.com/auth/admin.directory.user (optional later): Account provisioning only. Add later if you enable provisioning in Seven21.
Confirm it worked
Connection saved. Import preview lists people Seven21 can read. After Import, employees appear under People. Use Sync now anytime; Seven21 also runs a daily sync.
Troubleshooting
- Test and connect fails: Confirm the JSON type is service_account (not an OAuth client), the Client ID matches domain-wide delegation, and the scopes string matches the box exactly.
- Permission or directory probe errors: The Workspace admin email must be a real admin the service account can impersonate, and Admin SDK API must be enabled on the Cloud project. Delegation changes can take a short time to apply.
- People import but no Google sign-in activity: Add https://www.googleapis.com/auth/admin.reports.audit.readonly in Domain-wide delegation for the service account client ID, enable Admin SDK API in Google Cloud, and use a Workspace admin with Reports privileges. Then Sync now. People and Directories Sync show the specific cause when Reports fails.
- Lost the JSON file: Create a new key on the Keys tab. If the Client ID changed, update domain-wide delegation, then paste the new JSON in Seven21.
Signed in? Open this guide in Help Center · Contact support
