# Google Drive Integration

## Resmo + Google Drive Integration Fundamentals

<figure><img src="https://709615783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYrzxpMpCQh51K4O99y0o%2Fuploads%2FpOIOcifuE8CjTY50FFmd%2Fgoogle-drive-logo.png?alt=media&#x26;token=a50850b1-9611-4946-8527-69fbc222eae0" alt=""><figcaption></figcaption></figure>

Resmo integrates with Google Drive in one click to bring visibility and security to your Google Drive environment.

### What does Resmo offer to Google Drive users?

* Collect any kind of documents from your Drive.
* Query your documents to see scopes and visibilities.
* Set up custom security rules and run custom SQL queries to improve asset visibility.
* Use managed queries to evaluate your Google Drive security quickly.
* Understand how your Drive assets relate to each other in graph view.

### How does the integration work?

Resmo uses Google Workspace Reports API to do the initial polling and collect existing resources. Following the initial polling, it receives events in real time through webhook.

#### **Available resources**

{% embed url="<https://resources.resmo.com/googledrive>" %}

{% hint style="warning" %}
**Critical Notes**

* Business Standard pricing plan required at least one Google Workspace account to run this integration successfully.
* We are not accessing your document's content. Google Drive integration only takes permission for audit logs and customer information.
* Initially, this integration polls the last six months' audit logs, creates document resources, and listens for document events.
  {% endhint %}

### How to grant domain-wide delegation access to your organization

Resmo needs domain-wide delegation access to collect users' files in your organization. Yo can grant domain-wide delegation access for Resmo using following below steps. Visit official documentation for more [information](https://support.google.com/a/answer/162106).&#x20;

1. Go to [https://admin.google.com](https://admin.google.com/)
2. Go to **Security** > **Access and data control** > **API Controls**
3. Click **Manage Domain Wide Delegation**.
4. Click **Add new** and enter.&#x20;
   1. **Client ID**: `109597776999965244120`
   2. **OAuth Scopes**: `https://www.googleapis.com/auth/drive`

{% hint style="warning" %}

* For comprehensive management of file permissions via Resmo, the **broader Drive permission scope** is essential. This scope facilitates both the listing and the permission management of files within Google Drive. The OAuth scope to enable this enhanced functionality is `https://www.googleapis.com/auth/drive`.
* Alternatively, to assign Resmo **read-only access** for the Google Drive integration, thereby **excluding remediation functionalities**, you may allocate the read-only scope. This restricts Resmo's capabilities to data retrieval without the possibility of modification. You can only list and monitor your Drive files without the ability to manage them through Resmo. The read-only OAuth scope for this level of permission is `https://www.googleapis.com/auth/drive.metadata`.
  {% endhint %}

5. Click **Authorize.**

## Integration walkthrough

### How to install

1. Log in to your Resmo account and go to the Integrations page.
2. From there, select Google Drive and click the Add Integration button from the bottom right corner of the opening modal.

<figure><img src="https://709615783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYrzxpMpCQh51K4O99y0o%2Fuploads%2FRSNnHbjjHqxiU8KreqBn%2Fadd-google-drive.png?alt=media&#x26;token=bce5b936-b097-4a05-8bbf-2ec6f98f01aa" alt=""><figcaption></figcaption></figure>

5\. Hit the Create button, and you'll be redirected to your Google Account. Accept permissions.

6\. Your Google Drive integration is ready! Now you can start querying your resources!

<figure><img src="https://709615783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYrzxpMpCQh51K4O99y0o%2Fuploads%2F9ysLAJ5yVfqE74wDPTVe%2Fgoogle-drive-security-queries.png?alt=media&#x26;token=c09ea562-008c-4fda-8d8f-52933874fdc9" alt=""><figcaption></figcaption></figure>

### How to uninstall

1. Go to your Integrations page on Resmo.
2. Select Google Drive and go to the Integrated Accounts tab on the opening modal. Select the account you want to remove.
3. For temporary disabling, click the **Disable** button from the top right. This action can be reversed later by enabling the integration back. Or you can permanently uninstall the integration by clicking the **Delete** button. This action cannot be undone.

<figure><img src="https://709615783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYrzxpMpCQh51K4O99y0o%2Fuploads%2FKkww1KfL0RV1cmHkW8O7%2Fgoogledrive-disable.png?alt=media&#x26;token=957162ef-0da1-4adc-b54e-d708e0a7ff70" alt=""><figcaption></figcaption></figure>


---

# 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://resmocom.gitbook.io/product/integrations/google-drive-integration.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.
