Connect to Google Workspace using a service account with domain-wide delegation
Prerequisites
Before you begin, ensure you have:- Google Workspace Super Admin access
- Google Cloud Platform project access (or ability to create one)
- Your Google Workspace primary domain
Setup guide
Create service account in Google Cloud
1
Access Google Cloud Console
Navigate to the Google Cloud Console and select or create a project for the integration
2
Enable required APIs
Enable the following APIs in your project:
- Admin SDK API
- Cloud Identity API
3
Create service account
- Go to IAM & Admin > Service Accounts
- Click Create Service Account
- Enter a name (e.g., “Google Workspace Integration”)
- Click Create and Continue
- Skip the optional steps and click Done
4
Create service account key
- Click on the newly created service account
- Go to the Keys tab
- Click Add Key > Create new key
- Select JSON format
- Click Create - the key file will download automatically
Store this JSON key file securely. You’ll need it to configure the integration.
5
Note the client ID
On the service account details page, copy the Client ID (also called “Unique ID”). You’ll need this for domain-wide delegation.
Configure domain-wide delegation
1
Access Google Workspace Admin Console
Navigate to admin.google.com and sign in with your Super Admin account
2
Navigate to API controls
- Go to Security > Access and data control > API controls
- Scroll to Domain-wide delegation
- Click Manage Domain Wide Delegation
3
Add new API client
- Click Add new
- Enter the Client ID from your service account
- Add the following OAuth scopes (comma-separated):
- Click Authorize
4
Verify delegation
Confirm the service account appears in the list of authorized API clients with all required scopes
Add integration
1
Navigate to integrations
- Go to Settings > Integrations
- Find Google Workspace in the Software Access section
2
Select Google Workspace
Click Connect on the Google Workspace integration card
3
Configure service account credentials
Provide the following information from your service account JSON key file:
The unique 21-digit client ID for your service account (found in Google Cloud Console)
The private key from your service account JSON key file (PEM format). Download from Google Cloud Console > IAM & Admin > Service Accounts
The key ID for your service account key (found in Google Cloud Console > IAM & Admin > Service Accounts > Keys)
The email address from your service account JSON key file (
client_email field)4
Enter workspace details
Provide the following information:
Your Google Workspace primary domain (e.g.,
company.com)Email address of a Google Workspace admin user. Required for domain-wide delegation to access user and group data.
This admin must have User Management Admin role or equivalent permissions
5
Complete setup
Click Connect to complete the integration. This will:
- Validate the service account credentials
- Test API connectivity
- Begin initial sync of users, groups, and applications
Troubleshooting
Invalid credentials error
Invalid credentials error
Cause: Service account key is invalid or expired.Solution:
- Verify the JSON key file is correct and not corrupted
- Ensure the service account still exists in Google Cloud
- Create a new key if the current one is expired
Insufficient permissions error
Insufficient permissions error
Cause: Domain-wide delegation not configured or missing scopesSolution:
- Verify all required OAuth scopes are authorized in Google Workspace Admin Console
- Ensure the admin email has User Management Admin role
- Check that domain-wide delegation is enabled for the service account
Domain not found error
Domain not found error
Cause: Incorrect domain or domain not accessibleSolution:
- Verify the domain matches your Google Workspace primary domain
- Ensure the domain is active and not suspended
- Check for typos in the domain name
API not enabled error
API not enabled error
Cause: Required APIs not enabled in Google Cloud projectSolution:
- Enable Admin SDK API in Google Cloud Console
- Enable Cloud Identity API in Google Cloud Console
- Wait a few minutes for API enablement to propagate
Features
Once connected, you can use Google Workspace actions in workflows:Google Workspace Actions
Manage user group memberships, create groups, check group membership, and reset MFA/passwords