Skip to main content

Pre-requisites

Users with an existing GCP environment, it is recommended to have a new project that links to your Google Workspace via the registered domain
Admin Access to the Domain DNS Settings
Google Workspace Super Administrator access to authorize domain-wide delegation

Setup Google Workspace

Setting up Google Workspace involves several steps, depending on whether you create a new account or manage an existing domain.
1

Configure a New Project in GCP

GCP is hierarchical, so we must first create a project. If you already have a GCP environment set up, we recommend following similar steps below to create a new project that links to your Google Workspace via the registered domain.
  1. Go to Google Cloud Console.
    Sign in with your Google account used to set up Google Workspace.
  2. Click on the project selector (top-left dropdown near “Google Cloud”).
  3. Click “New Project” to configure the project with all the necessary details:
    • Project Name: Enter a unique name for your project (For example: AirMDR).
    • Organization & Location: Enter airmdr.com as organization and location or your organization and your location.
  4. Click Create.
    Now you have Successfully created a New Organization and Project in GCP

    Only the creator of the project has the right to manage the project.
2

Enable Admin SDK API and Google Workspace Alert center API

Our virtual agent will eventually use a GCP service account, which uses the Workspace Admin SDK to interact with the GW admin console REST API, therefore it needs to be enabled in GCP.

AirMDR uses the Admin SDK Reports and Directory APIs. Depending on the enabled AirMDR skills, the integration may also use the Alert Center, Google Drive, and Gmail APIs.
  1. Go to Google Cloud Console → APIs & Services → Library.
  2. Click Enable APIs and services in the top menu.
  3. Search for Each API:
    • Search “Admin SDK API”, click it, and click “Enable”.
    • Search “Google Workspace Alert Center API”, click it, and click “Enable”.
    • Search “Google Drive API”, click it, and click “Enable”.
    • Search “Gmail API”, click it, and click “Enable”.
When finished, you will have enabled the Admin SDK API within your project, where your service account will have access to pull data from Google Workspace.
Navigate to APIs & Services → Enabled APIs & services and confirm that every required API appears in the enabled list.
3

Configure OAuth Consent Screen in Google Cloud Platform (GCP)

  1. Go to the Google Cloud Console.
  2. Select your project.
  3. Navigate to “APIs & Services” → “OAuth consent screen” in the left-navigation pane.
  4. Click Get started.
  5. Configure App Information with the required details:
    • App Name: airmdr-agent
    • User Support Email: Provide an email for users to contact (For Example: your email address), and Click Next.
  6. Choose Audience as Internal.
  7. Provide the Developer Contact Information: (For Example: your email address), and click Next.
  8. In Finish, mark the checkbox to acknowledge and accept the terms of Google User Data Policy.
  9. Click “Create”.
    After successful configuration, we will now have a registered application using OAuth 2.0 for authorization and the consent screen information set
    The default token request limit for this app daily is 10,000 and can be increased on request.
4

Create a Service Account in Google Cloud

A service account is required for the AirMDR agent to ingest data from Google WorkspaceThis account is meant for non-human applications, allowing it to access resources in GW via the Admin SDK API we enabled earlier.
This is required to access Google Workspace APIs like Admin SDK API and Google Workspace Alert Center API.
  1. Go to Google Cloud Console → APIs & Services → Credentials → + Create credentials → Service account. Google Workspace1 Pn
  2. On the “Create Service Account” page provide the required details:
    • Service account name: airmdr-agent
    • Service account ID: airmdr-agent
    • Service account Description: Describe what this service account will do
  3. Click “Create and Continue”.
  4. Assign necessary roles to grant permissions:
    • “Service Account Token Creator”
    • “Viewer” or “Editor” (if needed for managing resources)
  5. Click “Done”. Google Workspace2 Pn
  6. Click on the newly created service account.
  7. Go to the “Keys” tab.
  8. Click “Add Key” → “Create New Key”.
Choose JSON format and click “Create”.
After successful configuration, we will now have a service account named airmdr-agent, a Service Account JSON file with the necessary credentials for this service account saved to your host.
Securely save and share the downloaded Service Account JSON file to AirMDR.
By default, the Owner role will be applied to this service account based on inheritance from the project
5

Enable Domain-Wide Delegation

Only admins can perform this action.
Our service account will need domain-wide delegation of permissions to access APIs that reach outside of GCP and into Google Workspace. The important data necessary for this has already been established in earlier steps where we need an API key, service account, and OAuth client ID.A Google Workspace Super Administrator must complete this configuration.
  1. Go to Google Workspace Admin Console.
  2. Navigate to Security → Access and data control → API controls.
  3. Under Domain Wide Delegation, select Manage Domain Wide Delegation → Add a new client ID and enter the required credentials: Google Workspace Pn
  4. Click “AUTHORIZE”.
  5. Open the newly added client and select View details.
  6. Confirm that all required scopes are displayed.
Now you have Successfully enabled Domain-wide Delegation in Google Workspace
AirMDR requires both the Service Account JSON and an admin_email_id. The Service Account JSON authenticates the AirMDR service account, while admin_email_id identifies the active Google Workspace user that AirMDR impersonates when executing Google Workspace API requests.

The impersonated user must have the privileges required by the enabled AirMDR skills.
Google Workspace OAuth Scope and AirMDR Capability Mapping:
  • admin.reports.audit.readonly: To access Google Workspace Audit Reports
  • apps.alerts: To read alerts
  • admin.directory.user.readonly: To list users and get user details
  • admin.directory.group.readonly: To list groups and retrieve group details
  • admin.directory.user: To suspend or reactivate a Google Workspace user
  • drive.readonly: To view and download Drive files
  • gmail.readonly: To view Gmail messages and settings
6

Admin EmailID Requirement

The admin_email_id field identifies the Google Workspace user that the AirMDR service account impersonates when making Google API requests.
A dedicated Google Workspace user provisioned specifically for the AirMDR integration is recommended.This avoids dependency on an individual employee’s account and prevents the integration from failing if that employee leaves the organization.
Required account characteristicsThe account entered as admin_email_id must:
  • Be an active Google Workspace user in the customer’s Workspace domain.
  • Have Admin API → Users → Read permission.
  • Have Admin API → Groups → Read permission.
  • Have access to the Gmail and Google Drive resources that AirMDR must retrieve.
  • Have the required Admin API privileges for the AirMDR skills being used.
  • Have access to the required Alert Center, Reports, Gmail, and Drive resources.
  • Remain active while the AirMDR connection is in use.
A dedicated Workspace account such as svc-airmdr-google@example.com is valid and preferred, provided it has the required Google Workspace privileges.
Example: admin_email_id: svc-airmdr-google@example.com
Google confirms that administrative console privileges provide corresponding Admin API rights. It specifically supports Users → Read and Groups → Read API for delegated administrators.

✅ Summary of Retrieved Credentials

Securely save and share the admin_email_id, and Service Account JSON file with the AirMDR team to configure
or
Self configure Google Workspace in the AirMDR Integrations Dashboard.

Skills Provided by this Integration

Users and Access

Gmail

Google Drive

Alerts and Audit Logs

Threat Intelligence

Configure Google Workspace in AirMDR Integrations Dashboard

  1. Navigate to AirMDR, provide the credentials, and click Login.
  2. Navigate to the AirMDR Integrations Dashboard in the left navigation pane and select ADMINIntegrations.
  3. Use the search option, enter the keyword “Google Workspace”, select the Connections tab, and click the Add New Connection icon.
  4. Enter the generated admin_email_id, provide the contents of the generated JSON file with Service Account credentials in the Authentication Details field params, and click Create.