# Email Security setup: Google Workspace

{% hint style="info" %}
Before you start:

1. You should **use the same web page** (with two different tabs) to confirm *Stoïk Protect* rights and set up the *Google Admin Console*.
2. Safari browser cannot be used, Stoïk recommends to use Google Chrome.
   {% endhint %}

### Walkthroug

Follow these steps to connect your Google tenant:

{% stepper %}
{% step %}
**Sign in with admin rights**

In Stoïk Protect, go to `Email`.

Select Google Workspace, then click `Connect your mailbox`.

Sign in to Google using an account with the required administrator rights (Google Workspace Admin).
{% endstep %}

{% step %}
**Set-Up Google Admin Console**

In the Google Admin console, open the page: <https://admin.google.com/ac/owl/domainwidedelegation>

Click Add a new API client.

In the window that opens, enter:

* ClientID: 108893255833546679906
* OAuth scopes:\
  <https://www.googleapis.com/auth/gmail.**readonly**,\\>
  <https://www.googleapis.com/auth/gmail.**modify**,\\>
  <https://www.googleapis.com/auth/gmail.**insert**,\\>
  <https://www.googleapis.com/auth/admin.**directory.user.readonly**,\\>
  <https://www.googleapis.com/auth/admin.**reports.audit.readonly**,\\>
  <https://www.googleapis.com/auth/gmail.**metadata>\*\*

Click `Authorize`
{% endstep %}

{% step %}
**Confirm**

In Stoïk Protect, click `Confirm` to verify the configuration
{% endstep %}

{% step %}

#### Setup is now complete

Your Google tenant is connected !
{% endstep %}
{% endstepper %}

### Monitoring

Once the connection is successfully established:

* View Monitored Mailboxes: Navigate to `Email` > `Mailboxes`. The list of monitored mailboxes will appear here.

Historical Data Retrieval: We will automatically begin retrieving emails from the past 90 days for all monitored mailboxes, starting with the oldest messages first.

This initial data retrieval process can take some time to complete.

### Multiple tenant connexion

You can connect as many tenants (Microsoft 365 or Google Workspace) as you require.

* Go to `Email` > `Settings`.
* Click `Add a provider`.
* Follow the same set-up procedure outlined in Set-up flow.

{% hint style="info" %}
If the users list doesn't show up more than 10 minutes after synchronization, please contact our team at <protect@stoik.io> to unlock the situation.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stoik.io/email-security/email-security-setup-google-workspace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
