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

# Microsoft 365

> MCP servers for Outlook, Outlook Calendar, OneDrive, SharePoint, and Teams via Microsoft Graph

<Info>
  **Built by Runlayer.** Runlayer builds and maintains this connector. It runs
  on Runlayer Deploy, which must be enabled for your workspace.
</Info>

<Note>
  **Microsoft 365 vs. Microsoft Agent 365** — This page covers Runlayer's first-party MCP servers built on **Microsoft Graph**: you register your own single-tenant Entra app, giving you granular control over scopes and tools. If you'd rather skip the app registration, or you need **Word or Copilot Search**, use [Microsoft Agent 365](/agent365-setup) instead — Microsoft's hosted "Work IQ" servers with near-zero setup.
</Note>

<Info>
  **Runlayer Deploy Required**: All Microsoft 365 servers require Runlayer Deploy to be enabled.
</Info>

Connect your AI assistant to [Microsoft 365](https://microsoft365.com) services. All Microsoft 365 servers share the same **Entra app registration** setup process.

| Server | Description |
| - | - |
| Microsoft Outlook | Read, search, send emails, and manage drafts; supports shared and delegated mailboxes |
| Microsoft Outlook Calendar | Browse and manage events, respond to invites, and find meeting times |
| Microsoft OneDrive | Browse, search, and manage files and folders |
| Microsoft SharePoint | Access sites, document libraries, lists, and list items |
| Microsoft Teams | Browse teams and channels, read and send channel and chat messages, create and manage chats and channels, and manage members |

## Available Tools

### Microsoft Outlook

| Tool | Description |
| - | - |
| `outlook_list_messages` | List messages in a folder (inbox, sentitems, drafts, …), newest first |
| `outlook_list_folders` | List top-level mail folders with counts |
| `outlook_get_message` | Fetch one message by id (headers + body, text or html) |
| `outlook_search_messages` | Full-text search via Graph `$search` (supports KQL-style operators) |
| `outlook_create_draft` | Save a new draft (all fields optional) |
| `outlook_send_message` | Send a new message immediately, optional save-to-sent |
| `outlook_send_draft` | Send a previously-saved draft by id |
| `outlook_reply_message` | Reply / reply-all to an existing message |
| `outlook_create_reply_draft` | Save a reply / reply-all draft nested in an existing thread, with optional prefilled comment |
| `outlook_forward_message` | Forward an existing message, with optional comment prepended |
| `outlook_update_message` | Update subject, body, read state, importance, or categories on a message |
| `outlook_delete_message` | Move to Deleted Items, or permanently delete if already there |
| `outlook_update_draft` | Update recipients, subject, or body on an existing draft |
| `outlook_get_attachments` | List attachments on a message (metadata only) |
| `outlook_download_attachment` | Download a single attachment as base64-encoded content |
| `outlook_upload_attachment` | Attach a small file (base64-encoded) to a message or draft |
| `outlook_delete_attachment` | Delete an attachment from a message or draft |

### Microsoft Outlook Calendar

| Tool | Description |
| - | - |
| `outlook_calendar_list_events` | List stored events on the primary calendar (no recurring expansion). Lightweight summaries (no full body or attendees; keeps `bodyPreview`); paginated via `cursor`. Use `select` to override fields, or `outlook_calendar_get_event` for full detail |
| `outlook_calendar_list_calendar_view` | Calendar occurrences in a time range, expanding recurring-series instances. Lightweight summaries; paginated via `cursor`. Use `select` to override fields, or `outlook_calendar_get_event` for full detail |
| `outlook_calendar_get_event` | Fetch one event by id (subject, full body, start/end, attendees, recurrence, online meeting) |
| `outlook_calendar_create_event` | Create an event with optional attendees, recurrence, and Teams/online meeting |
| `outlook_calendar_update_event` | Update fields on an existing event (subject, body, start/end, location, attendees, recurrence) |
| `outlook_calendar_delete_event` | Delete an event without notifying attendees |
| `outlook_calendar_accept_event` | Accept an invitation, with optional comment and send-response toggle |
| `outlook_calendar_decline_event` | Decline an invitation, with optional comment and send-response toggle |
| `outlook_calendar_cancel_event` | Cancel an event you organized and notify the attendees |
| `outlook_calendar_find_meeting_times` | Suggest meeting times based on attendee availability and constraints |
| `outlook_calendar_get_schedule` | Fetch free/busy info for up to 20 users, distribution lists, or resources |

### Microsoft OneDrive

| Tool | Description |
| - | - |
| `onedrive_list_items` | List the immediate children of a folder (defaults to drive root) |
| `onedrive_get_item` | Fetch metadata for a single file or folder by id |
| `onedrive_search_items` | Full-text search across the caller's OneDrive |
| `onedrive_list_shared_with_me` | List items shared with the caller by other users, including files in SharePoint libraries. Returns `driveId` for cross-drive reads |
| `onedrive_read_file` | Download a file and return its text. Plain-text files are returned as-is; Word (.docx), PDF, PowerPoint (.pptx), and Excel (.xlsx) have their text extracted server-side (≤ 5 MB). Pass `driveId` for SharePoint-library or shared-with-me files |
| `onedrive_create_folder` | Create a new folder |
| `onedrive_upload_file` | Create or overwrite a text file with provided content (≤ 5 MB) |
| `onedrive_rename_item` | Rename a file or folder |
| `onedrive_move_item` | Move a file or folder to a different folder |
| `onedrive_delete_item` | Move a file or folder to the Recycle Bin |
| `onedrive_create_share_link` | Generate a shareable view/edit/embed link for an item |

### Microsoft SharePoint

| Tool | Description |
| - | - |
| `sharepoint_list_sites` | List SharePoint sites the caller follows (not every accessible site; use `sharepoint_search_sites` for others) |
| `sharepoint_search_sites` | Find sites by exact name, full URL, server-relative path, or fuzzy phrase (tenant-wide). Site-only; does not search files |
| `sharepoint_get_site` | Fetch metadata for a single site by id or hostname/path |
| `sharepoint_list_drives` | List document libraries (drives) in a site. The returned `id` is the `driveId` for folder and file tools |
| `sharepoint_list_folder_items` | Browse files and folders inside a document library. Accepts a library display name or `b!…` drive id; subfolder by id or library-relative path |
| `sharepoint_read_file` | Download a file and return its text. Plain-text as-is; Word/PDF/PowerPoint/Excel text extracted server-side (≤ 5 MB). Accepts library display name and library-relative path |
| `sharepoint_list_lists` | List SharePoint lists in a site |
| `sharepoint_list_list_items` | List items in a SharePoint list, with optional field expansion |
| `sharepoint_get_list_item` | Fetch a single list item by id, including all field values |
| `sharepoint_create_list_item` | Create a new item in a SharePoint list |
| `sharepoint_update_list_item` | Update fields on an existing list item |
| `sharepoint_delete_list_item` | Delete an item from a SharePoint list |

### Microsoft Teams

| Tool | Description |
| - | - |
| `teams_list_joined_teams` | List the teams the signed-in user belongs to |
| `teams_get_team` | Get a single team by id |
| `teams_list_channels` | List the channels in a team |
| `teams_list_channel_messages` | List top-level messages in a channel (newest first; excludes replies) |
| `teams_send_channel_message` | Post a new top-level message to a channel |
| `teams_list_message_replies` | List the replies (thread) to a channel message |
| `teams_reply_to_channel_message` | Reply to a channel message, posting into its thread |
| `teams_create_channel` | Create a channel (standard, private, or shared) |
| `teams_get_channel` | Get a single channel by id |
| `teams_update_channel` | Update a channel's name and/or description |
| `teams_add_channel_member` | Add a member to a private or shared channel |
| `teams_list_channel_members` | List a channel's members |
| `teams_update_channel_member` | Change a channel member's owner role |
| `teams_list_chats` | List the user's 1:1 and group chats |
| `teams_list_chat_messages` | List messages in a chat (newest first) |
| `teams_send_chat_message` | Send a message to a 1:1 or group chat |
| `teams_create_chat` | Create a 1:1 or group chat |
| `teams_get_chat` | Get a single chat by id |
| `teams_update_chat` | Rename a group chat's topic |
| `teams_get_chat_message` | Get a single chat message by id |
| `teams_update_chat_message` | Edit the signed-in user's own chat message |
| `teams_delete_chat_message` | Soft-delete the signed-in user's own chat message |
| `teams_add_chat_member` | Add a member to a group chat |
| `teams_list_chat_members` | List a chat's members |

## Setup

<Steps>
  <Step title="Register a single-tenant Entra application">
    1. Sign in to [https://entra.microsoft.com](https://entra.microsoft.com) as a user who can create app registrations
    2. Go to **App registrations → New registration**
    3. Name it (e.g. "Runlayer Microsoft 365 MCP")
    4. Set **Supported account types** to **Single tenant only**
    5. Under **Redirect URI**, select **Web** and enter `https://<your-tenant>.runlayer.com/oauth/callback`
    6. Click **Register**
    7. Copy the **Application (client) ID** and **Directory (tenant) ID** — you'll need both below
  </Step>

  <Step title="Set requestedAccessTokenVersion to 2">
    1. In your app registration, open **Manifest**
    2. Find `"requestedAccessTokenVersion"` and set it to `2`
    3. Click **Save**
  </Step>

  <Step title="Grant Microsoft Graph permissions">
    1. Go to **API permissions → Add a permission → Microsoft Graph → Delegated permissions**
    2. Add the scopes for each server you want to use (see OAuth Scopes below)
    3. Click **Grant admin consent for \<your tenant>** — requires a tenant admin; without this, users see a "Need admin approval" error at first sign-in
  </Step>

  <Step title="Create a client secret">
    1. Go to **Certificates & secrets → New client secret**
    2. Add a description and expiry, then click **Add**
    3. Copy the **Value** immediately — it won't be shown again
  </Step>

  <Step title="Add connectors in Runlayer">
    For each Microsoft 365 server you want to use:

    1. In Runlayer, go to **My connectors** and click **+ Add connector**
    2. Search for the server (e.g. **Microsoft Outlook**) and click its card
    3. Click **+ Create New**
    4. Enter:
       * **MICROSOFT\_OAUTH\_CLIENT\_ID** — the Application (client) ID from Entra
       * **MICROSOFT\_OAUTH\_CLIENT\_SECRET** — the client secret value you copied
       * **MICROSOFT\_OAUTH\_TENANT** — the Directory (tenant) ID from Entra
    5. Click **Deploy Server** and wait for deployment to complete (typically a few minutes)
    6. When the button changes to **Go to Connector**, click it
  </Step>

  <Step title="Authorize">
    1. Click **Connect** on the connector page
    2. Sign in with a Microsoft account that exists in your Entra tenant and grant permissions
  </Step>
</Steps>

## OAuth Scopes

Add these scopes when configuring delegated permissions on your Entra app registration. Only add the scopes for the servers you intend to deploy. For OneDrive and SharePoint, the read-only scope is enough if you don't need write operations; the read-write scope is a superset that covers both.

| Server | Scope | Required for |
| - | - | - |
| All | `openid` | Sign-in |
| All | `profile` | User profile |
| All | `offline_access` | Refresh tokens for persistent access |
| All | `User.Read` | Identity resolution via Graph `/me` |
| Outlook | `Mail.ReadWrite` | Reading messages, listing folders, searching, and creating drafts (superset of `Mail.Read`) |
| Outlook | `Mail.Send` | Sending messages and sending saved drafts |
| Outlook (shared mailboxes) | `Mail.Read.Shared` | Reading messages in shared or delegated mailboxes |
| Outlook (shared mailboxes) | `Mail.ReadWrite.Shared` | Creating drafts, updating, and deleting messages in shared or delegated mailboxes |
| Outlook (shared mailboxes) | `Mail.Send.Shared` | Sending messages and drafts from shared or delegated mailboxes (send-as / send-on-behalf-of) |
| Outlook Calendar | `Calendars.ReadWrite` | Browsing events and free/busy, finding meeting times, creating/updating/deleting events, and responding to or cancelling invites |
| OneDrive | `Files.Read.All` | Listing items, getting metadata, searching, reading file content, listing shared-with-me |
| OneDrive | `Files.ReadWrite.All` | Creating folders, uploading files, renaming, moving, deleting, creating share links (superset of `Files.Read.All`) |
| SharePoint | `Sites.Read.All` | Listing and searching sites, browsing document libraries, reading list items and file content |
| SharePoint | `Sites.ReadWrite.All` | Creating, updating, and deleting list items (superset of `Sites.Read.All`) |
| Teams | `Team.ReadBasic.All` | Listing the teams the user belongs to |
| Teams | `Channel.ReadBasic.All` | Listing channels in a team |
| Teams | `ChannelMessage.Read.All` | Reading channel messages and replies |
| Teams | `ChannelMessage.Send` | Sending channel messages and replies |
| Teams | `Chat.ReadWrite` | Listing and getting chats, reading chat messages, listing chat members, creating chats, renaming group chats, sending/editing/deleting chat messages, and adding chat members (covers what `Chat.Read`, `ChatMessage.Send`, `Chat.Create`, and `ChatMember.ReadWrite` would grant) |
| Teams | `Channel.Create` | Creating channels |
| Teams | `ChannelSettings.ReadWrite.All` | Updating a channel's name or description |
| Teams | `ChannelMember.ReadWrite.All` | Adding, listing, and updating members of private and shared channels |

## Troubleshooting

<Accordion title="Need admin approval">
  Enterprise Entra tenants typically disable user consent. A tenant admin must click **Grant admin consent for \<tenant>** on the app registration's API permissions page before users can authorize.
</Accordion>

<Accordion title="Invalid redirect_uri">
  The redirect URI in the authorization request doesn't match any registered URI. Confirm `https://<your-tenant>.runlayer.com/oauth/callback` is listed under **Authentication → Redirect URIs** in your app registration.
</Accordion>

<Accordion title="Access is denied (Graph 403)">
  Token was issued before a required permission was added. In Runlayer, go to the connector's Settings, revoke access, then Connect again to re-consent.
</Accordion>

<Accordion title="Invalid grant">
  Tokens may have expired. Disconnect and reconnect the server in Runlayer.
</Accordion>

<Accordion title="sharepoint_list_sites returns empty">
  `sharepoint_list_sites` returns sites the user explicitly follows in SharePoint. If the list is empty, use `sharepoint_search_sites` to discover sites; it accepts an exact site name (including hyphenated names), a full site URL, a server-relative path, or a fuzzy phrase, and surfaces exact matches first. You can also navigate to a site in the browser and follow it first.
</Accordion>


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