Google Cloud Service Account Setup
GOOGLE CLOUD ADMIN
Relationship Intelligence uses a tenant-specific Google service account to request authorized, read-only access to Google Workspace directory and Gmail metadata APIs.
Complete these steps before configuring Domain-Wide Delegation or entering the Google Workspace provider in EIE.
Customer-controlled Google project
Create the service account inside a Google Cloud project owned and controlled by the customer. Never reuse one service account, private key, or Google Cloud project across unrelated tenants unless Real Intelligence has explicitly approved that architecture.
Before you begin
- Access to the customer's Google Cloud organization or approved Google Cloud project
- Permission to create or manage Google Cloud projects
- Permission to enable APIs
- Permission to create service accounts and service-account keys
- Google Workspace Super Admin access for Domain-Wide Delegation
- Access to the correct customer tenant in EIE
- A designated Google Workspace admin mailbox
- A mailbox that can be used for connection testing
Separate administrative roles may be required
The Google Cloud administrator and Google Workspace Super Admin may be different people. Both roles are required to complete the setup.
1. Create or select a Google Cloud project
- Sign in to the Google Cloud Console: https://console.cloud.google.com/
- Open the project selector.
- Select an existing customer-approved project, or create a dedicated project.
- Use a recognizable project name such as:
Real Intelligence Relationship Intelligence
Record the following:
| Item | Notes |
|---|---|
| Project name | Human-readable name shown in the console |
| Project ID | Immutable identifier used by Google APIs |
| Google Cloud organization | Owning organization, if applicable |
| Project owner | Responsible administrator for the project |
Confirm that the project is active and not scheduled for deletion.
Recommended practice
Use a dedicated production project when possible. Do not use an employee's personal Google Cloud project.
Some Google organizations may require billing or additional organization-policy approval before APIs or service-account keys can be enabled.
2. Enable the required Google APIs
In the selected Google Cloud project:
- Open APIs & Services → Library.
- Search for Admin SDK API.
- Open it and select Enable.
- Return to the API Library.
- Search for Gmail API.
- Open it and select Enable.
- Open APIs & Services → Enabled APIs & services.
- Confirm both APIs appear as enabled.
| API | Purpose |
|---|---|
| Admin SDK API | Reads authorized Workspace directory user and domain information |
| Gmail API | Reads authorized Gmail message metadata used to derive relationship signals |
Relationship Intelligence does not require an OAuth consent-screen flow for individual users. Authorization is performed through a service account and Google Workspace Domain-Wide Delegation.
3. Create the Relationship Intelligence service account
- Open IAM & Admin → Service Accounts.
- Select Create service account.
- Enter a descriptive name:
Relationship Intelligence
- Use the recommended service-account ID:
relationship-intelligence
- Use the recommended description:
Tenant-specific service account used by Real Intelligence Relationship Intelligence for authorized read-only Google Workspace directory and Gmail metadata access.
- Select Create and continue.
- Do not assign broad Google Cloud project roles unless specifically required by the customer's security policy.
- Complete the service-account creation.
Google Workspace API access is controlled through Domain-Wide Delegation and OAuth scopes. It does not require granting the service account Owner, Editor, or other broad project-level roles.
4. Enable Google Workspace Domain-Wide Delegation
- Open the newly created service account.
- Open its details or advanced settings.
- Locate Domain-wide delegation.
- Enable Google Workspace Domain-wide Delegation.
- If requested, enter a product name such as
Real Intelligence Relationship Intelligence. - Save the service account.
- Copy and securely record the service account's numeric OAuth 2 Client ID.
Use the numeric OAuth Client ID
Google Admin Console requires the numeric OAuth Client ID — not the service-account email address, project ID, key ID, or Salesforce certificate KID.
Example format only (not a real credential):
123456789012345678901
5. Create the service-account JSON credential
- Open the service account.
- Select the Keys tab.
- Select Add key → Create new key.
- Choose JSON.
- Select Create.
- Google downloads the credential file to the administrator's computer.
- Do not rename, edit, email, or paste the credential into an unapproved system.
- Continue directly to the EIE upload step.
The JSON file contains a private key
Treat the downloaded JSON file like a production password. Anyone with this credential and the authorized Domain-Wide Delegation scopes may be able to request delegated access.
Never:
- Email the JSON file
- Send it through Slack or chat
- Upload it to Salesforce
- Commit it to GitHub or another source repository
- Store it in a shared drive
- Reuse it for another customer or tenant
- Paste its contents into support tickets
The EIE interface should mask the JSON credential after it is saved and should never display the private key again.
If "Create new key" is unavailable
Google Cloud organizations may enforce an organization policy that prevents service-account key creation.
Possible causes include:
iam.disableServiceAccountKeyCreationis enforced- The administrator lacks permission to create service-account keys
- The project is governed by a centralized security policy
- Additional approval is required for persistent credentials
Recommended response:
- Do not attempt to bypass the organization's security policy.
- Contact the customer's Google Cloud or security administrator.
- Explain that the current EIE Google provider requires a tenant-specific service-account credential.
- Request an approved project-level exception only if allowed by the customer's security policy.
- Document who approved the exception.
If the customer will not permit JSON credentials, contact Real Intelligence to determine whether a keyless authentication option is available.
6. Configure the Google Workspace provider in EIE
EIE → Connected Systems → Google Workspace
| Field | Value |
|---|---|
| Workspace Domain | Customer's primary Google Workspace domain |
| Workspace Admin Subject | Authorized admin mailbox used for directory impersonation |
| Test Mailbox | Active mailbox used by the verification test |
| Service Account Credentials | Complete tenant-specific JSON credential |
Workspace Domain — use the customer's primary Google Workspace domain, not an alias domain unless the tenant configuration explicitly requires it.
Workspace Admin Subject — use an active Google Workspace account authorized for the required directory operations. This is the user identity the service account impersonates for directory calls.
Test Mailbox — use an active mailbox that the administrator is authorized to test. The test verifies Gmail metadata access without importing message bodies.
After saving, EIE should:
- Display the service-account email
- Display the numeric OAuth Client ID
- Display credential status
- Never redisplay the private key
| Status | Meaning |
|---|---|
| Credentials saved | EIE encrypted and stored the service-account credential |
| Delegation pending | Google Admin authorization is not yet verified |
| Connected | Credentials, delegation, Directory API, and Gmail API are operational |
| Failed | One or more configuration checks require attention |
Continue to Google Workspace Configuration to authorize the Client ID and scopes in Google Admin Console.
Credential lifecycle
Credential rotation
- Create a replacement JSON key for the same service account.
- Update the Google Workspace provider in EIE.
- Run EIE verification.
- Run Salesforce Verify Google Connection.
- Confirm active discovery jobs are operating normally.
- Disable the previous key.
- Monitor for failures.
- Delete the previous key after the approved overlap period.
Credential revocation
If a credential may have been exposed:
- Disable or delete the affected key immediately in Google Cloud Console.
- Pause Relationship Intelligence discovery for the tenant.
- Create and upload a replacement credential.
- Run EIE and Salesforce verification.
- Review Google Cloud and EIE audit records.
- Record the incident under the customer's security procedure.
Never delete an active key before the replacement credential has been uploaded and verified unless the key is suspected to be compromised.
Was this helpful?
Last updated 1 month ago