# OneDrive

> Let your assistants search and read your OneDrive files, including files shared with you, and save new files into a folder you pick.

OneDrive keeps the Word documents, Excel workbooks, and decks you work on every day. Once you connect it, you can ask about your files in plain words and your assistants search OneDrive, read the files they need, and answer with a link to each one. Paste a OneDrive link into chat and they open it. Ask them to save something and they find the folder you mean and save a new file there.

## At a glance

| | |
| --- | --- |
| Category | Files and storage |
| Connects with | Your Microsoft sign-in (personal, work, or school account), through Composio |
| Access | Reads and saves new files on its own |
| Used by | The CEO in chat, and every assistant |

## What assistants can do

| Ability | How it runs |
| --- | --- |
| Search files by name and by the text inside them | Reads on its own |
| Read Word, Excel (every sheet), PowerPoint, CSV, Markdown, and text files | Reads on its own |
| List a folder, including folders shared with you | Reads on its own |
| Open a OneDrive link you paste | Reads on its own |
| Find a folder by name and show its full path | Reads on its own |
| Save a new Word document, CSV spreadsheet, or text file into a folder you pick | Runs on its own |
| Change, move, share, or delete a file that is already there | Never |

## Connect it on stellarfirm.ai

1. Open [Integrations](https://stellarfirm.ai/app/integrations) and pick **OneDrive**.
2. Press **Sign in to OneDrive**. You sign in with Microsoft through Composio, the service StellarFirm connects apps with, so Microsoft shows Composio's app. Pick the account your assistants should work with.
3. Microsoft asks you to let that app access your files and keep the connection. Press **Accept**. Microsoft offers no narrower permission for saving into your own folders, so it reads broader than what StellarFirm does: your assistants read files, and save a new file on their own. StellarFirm refuses to change, move, share, or delete a file.
4. You come back to the OneDrive page, which now says **Connected**. Composio, the service StellarFirm connects apps with, keeps your sign-in.
5. Ask in chat: "what does the board deck in my OneDrive say about hiring?"

### If your organization asks for approval

Some organizations let only an administrator approve new apps. If Microsoft says **Need admin approval**, send the request it offers, or send your Microsoft 365 administrator the steps in [For IT administrators](/docs/trust/it-administrators#microsoft-entra-id), then sign in again.

## Saving a file

1. Ask in chat: "save this as a Word document in the Reports folder in my OneDrive".
2. The assistant looks for folders with that name. When more than one fits, or none does, it asks you which one, with each folder's full path.
3. It writes the file and saves it into that folder. The assistant tells you the file's name, its kind, and the folder's full path in its answer.
4. The assistant answers with the file's link.

A document is saved as a real Word file, a spreadsheet as CSV, which Excel opens. When a file with the same name is already there, OneDrive keeps both and gives the new one a number. If the folder changed name since the assistant found it, nothing is saved.

If you connected OneDrive before saving was possible, the OneDrive page says **Connect again to allow saving**.

## Connect it in the desktop app

1. In the Microsoft Entra admin center, register an app with the delegated permissions **Files.Read.All** and **offline_access**, and create a client secret. The desktop app reads with it; saving to OneDrive from chat is on stellarfirm.ai for now.
2. Sign in once with that app to get a refresh token.
3. On the computer that runs your assistants, set `MICROSOFT_CLIENT_ID`, `MICROSOFT_CLIENT_SECRET`, and `ONEDRIVE_REFRESH_TOKEN` (and `MICROSOFT_TENANT_ID` for an app that only your organization uses).
4. Switch OneDrive on and to live in the assistants' configuration.

## Pause or disconnect

- To end the connection, remove Composio from your Microsoft account at **myapps.microsoft.com** (work or school) or **account.live.com/consent/Manage** (personal).
- If you connected OneDrive with StellarFirm's own sign-in before, the OneDrive page keeps it under **Earlier sign-in**: **Turn off** keeps it but stops your assistants reading OneDrive with it, and **Disconnect** deletes it from StellarFirm. Remove StellarFirm in the same places to end that access too.

## Good to know

- Assistants see exactly what your Microsoft account can see.
- PDFs, pictures, and videos are listed but not read from OneDrive. Download a PDF and attach it to the chat, and the assistant reads it.
- Older Office files (.doc, .xls, .ppt) are not read. Save them in the newer format, or attach them to the chat.
- A file larger than 20 MB is not read from OneDrive. Attach it to the chat instead.
- Calls to OneDrive do not use StellarFirm credits. Only the assistant's own thinking does, as with every answer.

## Prompts

```prompt title="Find and summarize"
Find the board deck in my OneDrive and summarize what it says about hiring.
```

```prompt title="Read a pasted link"
Read this file and list every open question in it: [paste the OneDrive link]
```

```prompt title="Save a report"
Write a one page summary of this month's support tickets and save it as a Word document in the Reports folder in my OneDrive.
```

```prompt title="Contract terms"
Legal, find the latest signed supplier agreement in my OneDrive and list its renewal and termination terms.
```

---

Source: https://stellarfirm.ai/docs/integrations/onedrive
