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

# OneDrive integration

> Index the OneDrive of the Microsoft 365 user you create for End Close, so agents can read and save files there.

End Close can index the OneDrive of the Microsoft 365 user you create for it, or a folder in that OneDrive. It's a place to drop files for End Close, or for agents to save into, without setting up a SharePoint site. End Close shows it in **Files** and keeps it up to date as it changes.

End Close signs in as that user, so it can't open anyone else's OneDrive. To give End Close documents that sit in a colleague's OneDrive, move them to a SharePoint library the End Close user is a member of, or into the End Close user's OneDrive.

OneDrive uses the same Microsoft 365 connection as SharePoint. To create the End Close user and connect, follow [Create the End Close user](https://endclose.com/docs/integrations/sharepoint.md#create-the-end-close-user) and [Connect Microsoft 365](https://endclose.com/docs/integrations/sharepoint.md#connect-microsoft-365) in the SharePoint guide. If you've already connected for SharePoint, skip to [Add the OneDrive](#add-the-onedrive).

## At a glance

| | |
| - | - |
| **Connects as** | The Microsoft 365 user you create for End Close, signed in once |
| **What End Close reads** | That user's OneDrive, or the folders in it you add, shown in **Files** |
| **Permissions** | `Files.Read.All` to read, and optionally `Files.ReadWrite.All` so agents can save new files. Microsoft limits both to what the End Close user can open. |
| **Updates** | Microsoft change notifications, a check every 10 minutes, and a full re-index every week |
| **Who can set it up** | End Close admins |
| **Per environment** | Yes, one Microsoft 365 connection per environment |

## Prerequisites

* An End Close admin. Only admins can add a OneDrive.
* A Microsoft 365 connection, made by signing in as the End Close user. See the [SharePoint guide](https://endclose.com/docs/integrations/sharepoint.md#connect-microsoft-365).

## Add the OneDrive

**1. Open the picker**

In the Microsoft 365 dialog, choose **Add a library or folder**, then **OneDrive**. The picker opens the End Close user's OneDrive.

**2. Choose the OneDrive or a folder**

Choose **Add the whole library** to add the whole OneDrive, or open a folder in it and add just that folder.

End Close indexes the files straight away, and the OneDrive appears in **Files**. Folders you've already added show **Already catalogued** in the picker.

## How End Close stays up to date

* **Changes in Microsoft 365.** End Close subscribes to Microsoft change notifications for the OneDrive, and reads the changes when Microsoft reports them.
* **Every 10 minutes.** End Close also checks for changes every 10 minutes, so a missed notification delays a change by at most that long.
* **Weekly re-index.** End Close re-indexes the OneDrive once a week. To re-index sooner, open its menu in **Files** and choose **Re-index now**.

Agents can read files up to 200 MB.

## Agents saving files

Agents only create files. They never change, move or delete files already there. To let agents save, the connection needs the `Files.ReadWrite.All` permission. Choose **Reconnect to allow saving** in the Microsoft 365 dialog if it shows **Read-only**. If a file with the same name already exists, the save fails rather than overwriting it.

## Stop indexing or disconnect

* **Stop indexing a folder.** In **Files**, open the OneDrive, open its menu and choose **Stop cataloguing**. If it's the only folder added from it, the menu offers **Remove** instead.
* **Disconnect Microsoft 365.** See [Stop indexing or disconnect](https://endclose.com/docs/integrations/sharepoint.md#stop-indexing-or-disconnect) in the SharePoint guide. Disconnecting removes SharePoint libraries and the OneDrive together.

## FAQ

> [accordion] Can I add someone else's OneDrive?
>
> No. End Close signs in as the End Close user and can only open that user's OneDrive. Move the documents to a SharePoint library the End Close user is a member of, or into its OneDrive.

> [accordion] Can End Close change or delete my files?
>
> No. End Close reads what you add, and agents can only create new files. A save never replaces an existing file.

## Related

> [card] [SharePoint integration](https://endclose.com/docs/integrations/sharepoint.md)
>
> Create the End Close user and index SharePoint libraries.

> [card] [Box integration](https://endclose.com/docs/integrations/box.md)
>
> Index Box folders the same way.


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