> ## Documentation Index
> Fetch the complete documentation index at: https://docs.outkept.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Workspace

> Direct Message Injection delivers simulations through the Gmail API.

Direct Message Injection (DMI) delivers simulation emails straight into inboxes through
Google's Gmail API. It bypasses Google's email filters entirely, which means no IP-based
whitelisting is needed at all.

<Info>
  **Prerequisites:** a Google Workspace tenant and a Super Admin account.

  **Limitation:** DMI does not support alias email addresses.
</Info>

## Configure Google Workspace

<Steps>
  <Step title="Sign in as Super Admin">
    Go to [admin.google.com](https://admin.google.com) and sign in with a Super Admin
    account.
  </Step>

  <Step title="Open API controls">
    Navigate to **Security** then **Overview** then **API controls**.
  </Step>

  <Step title="Manage domain wide delegation">
    Under **Domain wide delegation**, click **Manage Domain Wide Delegation**, then **Add
    new**.
  </Step>

  <Step title="Enter our client ID and scope">
    | Field | Value |
    | - | - |
    | Client ID | `115622783926849825952` |
    | OAuth scope | `https://www.googleapis.com/auth/gmail.insert` |

    The scope must match exactly. Click **Authorize**.
  </Step>
</Steps>

## Configure the platform

<Steps>
  <Step title="Open the whitelisting settings">
    In the OutKept platform, go to **Settings** then **Whitelisting**.
  </Step>

  <Step title="Enable DMI">
    Find **Google Direct Message Injection (DMI)** and toggle **Enable**.
  </Step>

  <Step title="Send a test">
    Enter a test email address and click **Send test email**.
  </Step>

  <Step title="Confirm">
    Once the test email has arrived, toggle DMI on and click **Save changes**.
  </Step>
</Steps>

## Then what

**Have other security products enabled? Whitelist them now.**

| Product | Where to go |
| - | - |
| Third-party gateways and firewalls: Barracuda, FortiNet, Vade, WatchGuard | [Whitelisting](/whitelisting) |

Once everything that applies to your environment is whitelisted, send a test email from the
platform and confirm every interaction is recorded. See
[Testing your whitelisting](/whitelisting-testing).

## Troubleshooting

| Issue | Solution |
| - | - |
| Test email not received | Confirm the address is a valid Google Workspace address, and check the client ID and scope |
| Authorization error | Re-check that the scope is exactly `https://www.googleapis.com/auth/gmail.insert` |

## Disconnecting

<Steps>
  <Step title="Disable it on the platform">
    Turn DMI off in the platform settings.
  </Step>

  <Step title="Remove the delegation">
    In Google Admin, go to **Security** then **API controls** then **Manage Domain Wide
    Delegation**, find the client ID and remove it.
  </Step>
</Steps>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.