Setting up a Google Workspace abuse mailbox asset in Enterprise Security using the G Suite for Gmail app
When employees report suspicious emails, security teams must quickly distinguish genuine threats from spam and false positives. As reporting volumes grow, manual triage can delay the identification of malicious messages and increase the risk of account compromise and data loss.
This article shows you how to install and configure the G Suite for Gmail app asset used by Automated Threat Analysis (ATA) in Splunk Enterprise Security (ES) to ingest user-reported abuse or phishing messages from a Google Workspace mailbox. After configuration, messages in the selected mailbox label are ingested and analyzed automatically. The results, including full forensics, screenshots, and static and dynamic analysis through a sandbox, are surfaced as findings in Splunk Mission Control, so analysts can prioritize credible threats and respond quickly.
Prerequisites
- Splunk Enterprise Security Premier Cloud version 8.5 or later.
- The Automated Threat Analysis module activated in Splunk Enterprise Security Premier.
- G Suite for Gmail app version 3.0.0 or later.
- Permission to install Splunk SOAR apps and configure assets from ES.
- Access to the Google Cloud console to create the service account and JSON key, and to enable APIs.
- Super administrator access to the Google Admin console to set up domain-wide delegation, so the service account can act on behalf of the abuse mailbox.
If you have an existing configured asset and are upgrading to a newer app version, select Clone Asset from the asset's three-dot menu. The cloned asset exposes the new options available in the updated app version without you needing to re-enter credentials or other settings.
How to use Splunk software for this use case
This process moves between the Google Cloud console, the Google Admin console, Splunk SOAR and ES. The following table shows where each step takes place.
| What you do | Location |
|---|---|
| Step 1: Enable APIs and create the service account in Google Cloud | Google Cloud console |
| Step 2: Set up domain-wide delegation | Google Admin console |
| Step 3: Give the abuse mailbox account minimum Workspace admin rights | Google Admin console |
| Step 4: Confirm the G Suite for Gmail app is installed | ES, and Splunk SOAR if the app needs to be installed |
| Step 5: Configure the G Suite for Gmail asset in Enterprise Security | ES |
| Step 6: Test connectivity | ES |
Step 1: Enable APIs and create the service account in Google Cloud
- Log in to the Google Cloud console and navigate to the project that will house this integration.
- In the project, use the search bar to search for APIs & Services, then select Library.

- On the Library page, search for Gmail API, select it, and click Enable.

- Repeat this process for the Admin SDK API. Both the Gmail API and the Admin SDK API are now enabled.
- In the search bar at the top, search for IAM & Admin and select it.

- In the left menu panel, select Service Accounts, then click Create service account.

- Enter a name for the service account that indicates its use, such as
splunk-es-gmail-app. Leave the Permissions and Principals with access settings as they are, and click Create and close.
- Next, add a service account key to the service account. For the new service account, click the ⋮ (Actions) menu and select Manage keys.

- Click Add key, then select Create new key.

- Select JSON and click Create.

- Store the downloaded file securely. Google doesn't let you download the same private key again.
- Locate the service account client ID. Select the Details tab and expand Advanced settings. Click the copy icon next to Client ID and save the value for Step 2.

Step 2: Set up domain-wide delegation
If you're reusing an existing service account that already has domain-wide delegation set up with the scopes in the following table, you can skip this step.
- In a new browser tab, log in to the Google Admin console.
- Navigate to Security > Access and data control > API controls.

- On the API controls page, under Domain-wide delegation, click Manage Domain Wide Delegation.

- Click Add new. Paste the client ID from Step 1 into the Client ID field, and enter the OAuth scopes your organization needs. The following table shows each OAuth scope and the functions it supports.
OAuth scope Description https://www.googleapis.com/auth/admin.directory.user.readonlyRequired for listing users and for the Test Connectivity function in the G Suite for Gmail app. https://www.googleapis.com/auth/gmail.readonlyRequired for ongoing polling to retrieve mail from the abuse mailbox for ingestion into ATA. https://mail.google.com/Optional. Used for the following actions if they're performed in a Splunk SOAR playbook as part of your organization's phishing triage workflow: - Delete email
- Move email to trash
- Remove email from trash
- Add label to email
- Forward
- Auto-reply
- Send email
Delete email through this scope is permanent and skips Trash. For phishing-response playbooks, we recommend using move email to trash instead.
https://www.googleapis.com/auth/gmail.settings.sharingSend email (send-as alias settings). https://www.googleapis.com/auth/admin.directory.user.aliasSend email (user alias lookups). 
- Click Authorize.
Step 3: Give the abuse mailbox account minimum Workspace admin rights
- In the Google Admin console tab, navigate to Account > Admin roles and click Create new role.

- Enter a distinct name for the custom role.
- Assign the custom role the Users > Read permission. Select the Users > Read checkbox, then click Continue.

- On the final page, review the assigned privileges and click Create Role.

- On the role assignment page that opens, click Assign members, enter the abuse mailbox you'll use, and click Assign role.

Step 4: Confirm the G Suite for Gmail app is installed
The G Suite for Gmail app is installed for all customers on ES version 8.5 or later. Check that it's installed before you continue.
- In ES, navigate to Configure > Splunk SOAR > Apps.
- Search for G Suite for Gmail.
- If the app appears, proceed to Step 5.
- If the app doesn't appear, install it in Splunk SOAR. Continue with the following steps.
- In Splunk SOAR, navigate to Home > Apps.

- Search for G Suite for Gmail in the Configured Apps and Unconfigured Apps tabs. If there are no results under either tab, click New Apps.

- Search for G Suite for Gmail and click Install.
Step 5: Configure the G Suite for Gmail asset in Enterprise Security
- In ES, navigate to Enterprise Security > Mission Control.
- In Splunk Mission Control, select Configure > Splunk SOAR.

- Select Apps.
- Search for G Suite for Gmail. To open the asset configuration page, click View on the app, or click Configure if the app is on the Not configured tab.

- In Asset Settings, fill in the required mailbox fields.
Field Value Asset Name A descriptive asset name, such as abuse_mailbox. You can't change the asset name after it's added.Login (Admin) email The abuse mailbox email address, for example abusemailbox@your-organization.com. This is the account you assigned the custom role to in Step 3.Contents of Service Account JSON file The entire contents of the service account JSON file you downloaded in Step 1. Mailbox Label (folder) to be polled The location of the abuse mail to ingest, such as inbox. If you leave this field blank, the asset pollsINBOX. The label must already exist in the mailbox, or polling fails with a "Label not found" error.
- Click Next to move to Ingest Settings. Specify your desired investigation type, security domain, urgency, and polling interval.

- Expand Additional settings and confirm that Run threat analysis is selected. When it's selected, all emails retrieved from the connected mailbox are processed by ATA, and the results are returned in the ES queue. (Optional) Select Launch automation after threat analysis is complete to delay Splunk SOAR playbook execution until ATA analysis is complete.

- Click Save to complete the asset configuration.
Step 6: Test connectivity
Click Test Connectivity and verify that the connectivity result is a success. If you get errors during this step, see Troubleshooting.

The asset configuration is now complete, and the specified abuse mailbox is polled based on the interval or schedule you defined. Each analyzed email appears as a finding in Splunk Mission Control, as in the following example.

Troubleshooting
- If Test Connectivity returns
unauthorized_client, confirm that the service account's numeric client ID, not its email address, was added under Security > API controls > Manage Domain Wide Delegation in the Google Admin console. - If Test Connectivity returns
403 Not Authorized to access this resource/api, confirm that the Login (Admin) email is assigned to the custom Workspace admin role with the Users > Read privilege. Assign the role to the member or user, not to the Google Cloud service account. - If the test fails while "Retrieving domain users", confirm that both the Admin SDK API and the Gmail API are enabled in the same Google Cloud project that owns the service account.
- Confirm that domain-wide delegation includes
https://www.googleapis.com/auth/admin.directory.user.readonly. The connector uses this scope to list a domain user during its connectivity check. It doesn't grant Gmail mailbox access. - Confirm that the Login (Admin) email is an active Google Workspace user in the same domain as the mailboxes being accessed. Don't enter the service account email in this field.
- Paste the entire service account JSON key file, from the opening
{through the closing}, into the Contents of Service Account JSON file field. Don't paste only the private key value. - If email polling, querying, or retrieving messages fails after connectivity succeeds, add
https://www.googleapis.com/auth/gmail.readonlyto the same domain-wide delegation entry. - If sending email, auto-reply, or forwarding fails, add the
https://mail.google.com/scope, which the current connector requires for these actions. Add it only when you use those actions. - After changing APIs, delegation scopes, or admin roles, wait before retesting. Changes can take up to 24 hours but usually take effect much sooner. If a custom role is scoped to an organizational unit (OU), make sure it covers all OUs whose users Splunk SOAR needs to list or access.
Next steps
You might find the following resources useful for implementing the guidance in this article:
- Splunk Lantern Article: Setting up a Microsoft 365 abuse mailbox asset in Enterprise Security
- Splunk Lantern Article: Setting up a Google Workspace abuse mailbox asset in Enterprise Security using the IMAP v2 app
- Splunk Help: Configure Splunk SOAR apps in Splunk Enterprise Security
- Splunkbase: G Suite for Gmail

