# Configure the Microsoft 365 MCP Server

Run Microsoft 365's community MCP server as a sidecar next to your Dtwo gateway, connected via OAuth.

## Overview

Microsoft 365 access is provided through [Softeria's `ms-365-mcp-server`](https://github.com/Softeria/ms-365-mcp-server), an open-source community MCP server that surfaces roughly 200 Microsoft Graph tools covering Outlook mail, Calendar, Teams, SharePoint/OneDrive, and more. Rather than a hosted endpoint, this server runs as a sidecar alongside your gateway — Dtwo installs and manages it for you and registers it as a proxied MCP server. Access is authorized through OAuth against your organization's own Microsoft Entra ID tenant.

## 1. Register a Microsoft Entra ID app

1. Open the <a href="https://entra.microsoft.com" target="_blank" rel="noopener noreferrer">Microsoft Entra admin center</a> and go to **App registrations → New registration**. Give it a name (for example `MS365 MCP Server`), set **Supported account types** to **Single Tenant Only — Default Directory**, and select **Register**.
2. From the app's **Overview** page, copy the **Application (client) ID** and **Directory (tenant) ID**.
3. Go to **Certificates & secrets → New client secret**, add a description (for example `MCP Server`), and copy the secret value immediately — it isn't shown again.
4. Go to **Authentication → Add a platform → Web**, and add your gateway's OAuth callback URL as a redirect URI — found in the Overview tab for your gateway in the Dtwo UI.

## 2. Add the MCP server in the Dtwo UI

Dtwo takes care of deploying the sidecar and registering it with your gateway:

1. Go to your gateway in the Dtwo UI and open the **Configuration** tab.
2. Click **+ MCP server quick start**.
3. Click **+ Add** next to **Microsoft 365**.
4. Enter the **Application (client) ID**, **Directory (tenant) ID**, and **Client secret** from Step 1, and click **+ Add**.

## 3. Upgrade gateway, deploy, and verify

Save your changes. An **Update Gateway** button will appear — click it and follow the instructions to update and deploy your gateway. This will take about 1 to 2 minutes to complete.

Then, in your AI client, ask it to authorize Microsoft 365 via the gateway. This opens the Microsoft sign-in screen — sign in as the user whose permissions the agent should inherit, and approve the consent prompt. Once authorized, confirm the server's tools appear (for example `ms365-list-calendars` or `ms365-list-mail-messages`) and run a quick call to make sure the connection works.

If the tools don't appear after you authorize, refresh the tool list in your AI client — some clients don't pick it up automatically.

---

Having trouble? Email [support@dtwo.ai](mailto:support@dtwo.ai).