Skip to main content

How to Connect Microsoft 365

๐Ÿ”ง Tools ยท MCP

Zeta Alpha hosts a Microsoft 365 MCP server. It holds no credentials of its own: each user signs in to your Microsoft Entra ID tenant, and the server forwards that user's Microsoft Graph token on every call. An agent therefore sees exactly what the signed-in user can see.

The Hosted Serverโ€‹

The server runs inside the platform and is not reachable from the internet. Zeta Alpha gives you its URL for your environment. It runs in organization mode (work and school accounts). By default it exposes the tools below; Zeta Alpha can enable more Microsoft Graph tools for your environment on request.

AreaTools
Searchsearch-query
Maillist-mail-messages, get-mail-message, create-draft-email
Calendarget-calendar-view, list-calendar-events
Meetingslist-online-meetings, get-online-meeting, list-meeting-transcripts, get-meeting-transcript-content
Teams chatslist-chats, list-chat-messages
Fileslist-drives, upload-file-content, create-drive-item-share-link

To let the agent save My Documents files to OneDrive with these tools, also enable OneDrive Saving and My Documents files in tool calls for this server.

1. Register the App in Microsoft Entra IDโ€‹

In the Microsoft Entra admin center, as an administrator of your tenant:

  1. App registrations โ†’ New registration:

    • Name: Zeta Alpha MCP.
    • Supported account types: Accounts in this organizational directory only (single tenant).
    • Redirect URI: platform Public client/native (mobile & desktop), URI https://api.<your environment>/v0/service/mcp/oauth/callback.
  2. Click Register. From Overview, copy the Application (client) ID and the Directory (tenant) ID.

  3. API permissions โ†’ Add a permission โ†’ Microsoft Graph โ†’ Delegated permissions, and add:

    AreaPermissions
    MailMail.Read, Mail.ReadWrite
    CalendarCalendars.Read
    FilesFiles.Read, Files.ReadWrite, Files.Read.All, Sites.Read.All
    Teams chats and channelsChat.ReadBasic, Chat.Read, ChatMessage.Read, ChannelMessage.Read.All
    MeetingsOnlineMeetings.Read, OnlineMeetingTranscript.Read.All
    PeoplePeople.Read
  4. Click Grant admin consent for <your organization>. Every permission must show Granted. Users are not asked to consent individually: the platform requests the consented set as a whole (https://graph.microsoft.com/.default).

The app is a public client, so it has no secret. If your security policy requires a confidential client, register the redirect URI under the Web platform instead, create a secret under Certificates & secrets, and store it in the server's OAuth client secret field.

2. Add the Server to the Tenantโ€‹

Add a server under the tenant's MCP Servers (see Adding a Server to the Tenant):

FieldValue
Namems365
DescriptionThe user's Outlook mail, calendar, Teams chats and meetings, OneDrive and SharePoint files.
URLThe server URL Zeta Alpha gives you
Authorization server URLhttps://login.microsoftonline.com/<Directory (tenant) ID>/v2.0. Users sign in to your Entra tenant, not at an authorization server the MCP server advertises.
OAuth client IDThe Application (client) ID from step 1
Scopeshttps://graph.microsoft.com/.default offline_access. .default requests every Graph permission granted in step 1; offline_access returns a refresh token so users stay connected.
Redirect URIEmpty, or the redirect URI registered in step 1 if it differs from the platform callback URL
App name, Icon URLMicrosoft 365 and the URL of a Microsoft 365 icon

Then mount the server on each agent that should use it (Mounting a Server on an Agent):

{
"mcp_tools_provider_configuration": {
"enabled": true,
"mounts": [{ "name": "ms365" }]
}
}

3. Ask Before Writingโ€‹

By default the agent runs every tool without asking. Set the agent's MCP Tools โ†’ Ask the user before to Tools that may change data (confirmation_default: "non_read_only"), so the user approves each call of a tool the server does not mark read-only:

{
"mcp_tools_provider_configuration": {
"enabled": true,
"mounts": [{ "name": "ms365" }],
"confirmation_default": "non_read_only"
}
}

The server marks every tool above read-only except create-draft-email, upload-file-content and create-drive-item-share-link, so those three ask first. To make one more tool ask, set it to Always ask in the server's tool list in the agent editor. Users can make other tools ask first, or turn a tool off, from Connected apps in the chat; what their Always allow cannot waive is in Tool rules.

4. Connect from the Chatโ€‹

Each user opens Sources and apps in the chat, clicks Connect next to Microsoft 365 under Connected apps, and signs in with their work account once. The agent can also offer the sign-in when it first needs the server; see Connecting from the Navigator. Tokens are stored per user and refreshed automatically.

When the server's sign-in settings change (Authorization server URL, OAuth client ID or Scopes), existing connections show Not connected and every user signs in again.

Troubleshootingโ€‹

SymptomCause
AADSTS50011: The redirect URI ... does not matchThe redirect URI in Entra differs from the server's Redirect URI, or is registered under the wrong platform.
AADSTS7000218: The request body must contain ... client_assertion or client_secretThe redirect URI is registered under Web, which makes the app confidential. Move it to Mobile and desktop applications, or configure a client secret.
AADSTS65001: The user or administrator has not consentedAdmin consent was not granted, or a permission was added after consent. Grant admin consent again.
AADSTS700016: Application ... was not found in the directoryAuthorization server URL names a different tenant than the one the app is registered in.
Every user shows Not connected after a configuration changeThe sign-in settings changed. Users connect again.
A tool returns 403 ForbiddenThe signed-in user has no access to that mailbox, file or chat, or its permission is missing from step 1.