---
name: "m365_files_read"
area: "microsoft365"
title: "Read a OneDrive file"
price: "free"
method: "POST"
url: "https://api.conecto.chat/v1/tools/m365_files_read"
mcp_server: "https://api.conecto.chat/mcp/microsoft365"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/microsoft365/m365_files_read"
---

# Read a OneDrive file (`m365_files_read`)

A OneDrive file's words: text, PDF, Word, Excel or PowerPoint, up to 5 MB.

A file's words, up to 5 MB: text, PDF, Word, Excel and PowerPoint files are read in a separate, capped process. Free.

Price: Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads. A call that fails costs nothing.

## Use it when

A search found the document and the agent needs what it says.

## Say this to your agent

> What does the returns policy say about used equipment?

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `mailbox` | string | no | One of the mailboxes the agent may act as; optional when only one is connected. Up to 254 characters. |  |  |
| `file_id` | string | yes | 1 to 400 characters. |  |  |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `m365_files_read` on the MCP server `https://api.conecto.chat/mcp/microsoft365` with these arguments:

```json
{
  "mailbox": "support@hansenvoss.example",
  "file_id": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/m365_files_read \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mailbox": "support@hansenvoss.example", "file_id": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "m365_files_read",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.00",
  "balance_usd": "$19.75",
  "result": {
    "mailbox": "support@hansenvoss.example",
    "file": {
      "id": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K",
      "name": "Returns policy.txt",
      "size": 182,
      "folder": false,
      "type": "text/plain",
      "modified_at": "2026-09-02T10:12:00Z",
      "link": "https://hansenvoss-my.sharepoint.com/personal/support/Documents/Returns%20policy.txt",
      "text": "Returns policy\n\nEquipment can be returned within 30 days in its original packaging. We collect it for free; the refund follows within 5 working days of collection."
    }
  }
}
```

`result`: mailbox; file: id, name, size, type, modified_at, link and text.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_connected` | 409 | Microsoft 365 isn't connected yet. | Connect it with m365_connect. |
| `not_allowed` | 403 | The mailbox is not one the agent may act as. | Use a connected mailbox; the owner adds one by connecting again. |
| `not_found` | 404 | Microsoft 365 has no such message, event or file. | Search first and use its id. |
| `too_large` | 413 | The file is over 5 MB. | Open it at its link. |
| `unsupported_type` | 400 | The file is not text, PDF or Office. | Open it at its link. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [m365_connect](https://conecto.chat/tools/microsoft365/m365_connect.md): Connects the company's Microsoft 365 through its own app, for the mailboxes the agent may act as. Free.
- [m365_mail_search](https://conecto.chat/tools/microsoft365/m365_mail_search.md): The newest messages in a mailbox folder, or those matching a search. Free up to 1,000,000 reads a month.
- [m365_mail_read](https://conecto.chat/tools/microsoft365/m365_mail_read.md): One message in full, with its body as text and its attachments' names. Free up to 1,000,000 reads a month.
- [m365_mail_send](https://conecto.chat/tools/microsoft365/m365_mail_send.md): Sends an email, or a reply in the same thread, as one of the company's mailboxes. $0.001 a call.
- [m365_calendar_events](https://conecto.chat/tools/microsoft365/m365_calendar_events.md): The events in a mailbox's calendar between two times, in UTC. Free up to 1,000,000 reads a month.
- [m365_calendar_create](https://conecto.chat/tools/microsoft365/m365_calendar_create.md): Adds an event to a mailbox's calendar and invites its attendees, with a Teams link if asked. $0.001 a call.
- [m365_calendar_cancel](https://conecto.chat/tools/microsoft365/m365_calendar_cancel.md): Cancels an event the mailbox organizes and tells its attendees; waits for the owner by default. $0.001 a call.
- [m365_files_search](https://conecto.chat/tools/microsoft365/m365_files_search.md): Files in a mailbox user's OneDrive whose name or words match. Free up to 1,000,000 reads a month.
- [m365_files_upload](https://conecto.chat/tools/microsoft365/m365_files_upload.md): Writes a text file to a path in a mailbox user's OneDrive; replacing one waits for the owner. $0.001 a call.
- [m365_disconnect](https://conecto.chat/tools/microsoft365/m365_disconnect.md): Forgets the app's secret and the mailboxes; nothing in Microsoft 365 changes. Free.
