Skip to main content
Outlook The Outlook app provides read/write access to a Microsoft 365 mailbox (mail, calendar and contacts) through the Microsoft Graph REST API (v1.0). It can be consumed two ways: as a remote MCP server that Agent Creator agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into six entity tools (mail, mailFolders, calendars, events, contacts, contactFolders), each driven by an action argument, and runs in the tenant app-instance context (it resolves the installing workspace’s own credentials). Authentication is per-user and supports several modes:
  • Per-user OAuth2, central client (oauthCentral, recommended): one Microsoft Entra OAuth Application is registered once by the platform maintainer; every end user signs in with their own Microsoft account. Nothing to register per tenant: each workspace just installs the app and clicks Connect.
  • Per-user OAuth2, tenant client (oauth): paste your own Entra application (client) ID/secret in the connector config app. Each user signs in with their own account against your client (PKCE authorization-code flow).
  • Application, client credentials (clientCredentials): an Entra app with application Graph permissions and admin consent, acting on a target mailbox without an interactive sign-in. Best for back-office / service automations.
  • Direct access token (accessToken): a caller-managed Microsoft Graph access token, used as-is with no exchange.

Mail

Read, search, draft, send, reply, forward and move messages and attachments; browse and manage mail folders

Calendar & contacts

List, create and update calendar events, respond to meeting invites and query a time window; manage personal contacts and contact folders

Flexible per-user auth

Per-user Microsoft Entra OAuth (central or tenant client), application client-credentials, or a direct access token

Who is this for?

This connector is used by four different roles. Jump to the section that matches yours; each one is self-contained.

Agent builder

You build agents in Agent Creator and want them to read and act on Outlook mail, calendar and contacts. → Agent builder tab.

Knowledge base owner

You want a mail folder indexed and searchable semantically, kept up to date. → Knowledge base (sync) tab.

Platform admin

You run the platform and set up the shared Microsoft Entra OAuth client once for everyone. → Platform admin setup accordion below.

Workspace builder

You write Builder automations (DSUL) that call Outlook operations directly. → Workspace builder tab.

Prerequisites (Microsoft side)

  • A Microsoft 365 account, and an Azure / Microsoft Entra ID tenant where you can register an application (or a maintainer who already did).
  • An app registration in Microsoft Entra ID (Azure portal → App registrations), with a client secret created under Certificates & secrets, or a certificate (see Certificate instead of a client secret).
  • Microsoft Graph delegated permissions granted on the app (for the per-user OAuth modes), covering the resources you intend to use:
    • Mail: Mail.ReadWrite, Mail.Send — drafts, including reply and forward drafts, only need Mail.ReadWrite: leave Mail.Send out of the grant and agents can prepare mail but never send it.
    • Calendar: Calendars.ReadWrite
    • Contacts: Contacts.ReadWrite
    • Sign-in / identity: User.Read, openid, profile, offline_access
  • For the application (client-credentials) mode instead, grant the equivalent application permissions and have a Global Administrator grant admin consent.
The OAuth scopes requested by default are:
Goal: two one-time tasks: (1) configure the shared central Microsoft Entra OAuth client so every workspace lets its users sign in with their own Microsoft account, and (2) expose Outlook as a reusable capability in AI Governance so agent builders can pick it without pasting endpoint URLs.

1. Configure the connector

1

Register the OAuth Application in Microsoft Entra ID

In Microsoft Entra ID → App registrations > New registration, register a Web application. Add a Redirect URI pointing at the core workspace callback:
(e.g. https://api.studio.prisme.ai/v2/workspaces/08QVA1T/webhooks/oauthCallback on production).
Microsoft Entra rejects redirect URIs that contain a colon in the path, so use the raw workspace id of the core Outlook workspace (<workspace-id>, e.g. 08QVA1T), not the slug:outlook-next form used by other connectors. Copy the exact URI from the connector’s configuration app, which renders it for you.
Add the Microsoft Graph delegated permissions listed in Prerequisites, create a client secret under Certificates & secrets, and note the Application (client) ID, the secret value, and the Directory (tenant) ID (or use common / organizations for multi-tenant).
2

Enter the credentials through the configuration app

Open the central outlook-next workspace and launch its Configuration app: <studio>/apps/outlook-next (e.g. https://studio.prisme.ai/apps/outlook-next), also linked as Configuration app on the installed instance. Switch to the maintainer view and follow the in-app instructions to paste the Client ID, Client Secret, Tenant and (optionally) scopes and a Microsoft Graph base URL; the app stores them in the core workspace’s secrets for you. Do not edit Studio’s raw Secrets by hand. These credentials stay in the outlook-next workspace and are never exposed to tenants or end users; token exchange is proxied through the core centralTokenExchange webhook so the client secret never leaves the core workspace.
3

Tell workspaces to use the central client

Each consuming workspace selects auth mode oauthCentral in the connector configuration app (no client id/secret to enter on their side). Their users then just click Connect.

Certificate instead of a client secret

Microsoft recommends certificate credentials over client secrets: a secret expires after at most 24 months and is easy to copy. In certificate mode the connector signs each token request with a private key (a client_assertion JWT, PS256). The key never goes through Prisme.ai’s database or UI: the platform operator injects it into the runtime from your key store, as an environment variable.
1

Upload the certificate to Entra

In the app registration → Certificates & secrets > Certificates, upload the public certificate (.cer, .pem or .crt).
2

Inject the private key into the runtime

The value is a PEM bundle, base64-encoded on one line: the unencrypted RSA private key (2048 to 4096 bits) and the certificate uploaded to Entra, in any order. Chain certificates may stay in the bundle: the connector picks the certificate that matches the key and reads its thumbprint, so key and certificate always change together. Azure Key Vault’s PEM export already has this layout.
Expose it to the prismeai-runtime pods under this exact name (a WORKSPACE_SECRET_ variable):The configuration app shows the exact name to use, and the maintainer view shows whether the runtime holds the central key. The workspace slug is kept as is, dashes included. Renaming the workspace changes the name: set the new variable before renaming, or the connector stops authenticating. Restart the runtime pods after setting or changing the variable.For example, with the External Secrets Operator reading from your KMS:
Then add outlook-next-cert to the runtime deployment’s envFrom.
Never create a workspace secret with the same name (outlookNextCentralCertKey / outlookNextCertKey): a stored secret hides the environment variable. Never use an APP_SECRET_… variable either, as it would hand the key to every instance of the connector on the platform.
3

Switch the connector to certificate mode

In the configuration app, set Client authentication to Certificate. The central client is configured from the maintainer view; a workspace’s own client from its own configuration app. If the key cannot be read, connecting or Test connection names the missing variable. A broken client credential never disconnects users: requests fail until it is fixed, then work again without reconnecting.Saving certificate mode also wires the key to the connector instance, including on a workspace that installed the connector before certificate support.To provision the central client by script, the core workspace’s setOAuthClient webhook takes clientAuthMethod: certificate (default secret), with no clientSecret, and maintainerStatus returns clientAuthMethod and certKeyLoaded.
Rotation: upload the new certificate to Entra next to the old one, replace the bundle in your KMS and restart the runtime pods. Delete the old certificate in Entra only once every pod has restarted: a pod still running signs with the old key.

2. Declare the capability in AI Governance

Generic connectors (broad tool surfaces meant to be shared across many agents, like Outlook) are best exposed as a named capability in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint.
1

Open AI Governance > Capabilities

Create (or edit) the Outlook capability.
2

Point it at the MCP endpoint

Set the capability’s MCP server URL to the connector’s MCP Endpoint, and set its Scope to:
The agent_id in the scope is what lets the connector identify and authorize the calling agent. attachment_urls lets the mail send action attach files the user uploaded in the chat.
3

Make it available to agent builders

Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization’s existing roles; there is no per-capability role grant.
4

Smoke-test

From an agent that has the capability, in a workspace configured for oauthCentral, trigger any tool. The user is prompted to connect once (Microsoft sign-in); subsequent calls reuse the stored token transparently and refresh it automatically.
The connector’s configuration app also offers a one-click Add to catalog button (workspace owner / admin only) that publishes the Outlook capability to the organization-wide Capabilities catalog for you, the easiest way to expose it to agent builders without hand-editing Governance.
Declaring the capability makes the connector available; it does not by itself authorize a specific agent. This connector follows the tenant-context model: which agents may actually call it is gated per-workspace by the authorized-agents allowlist in the configuration app (see the Workspace builder tab). Agents show a Connect button only if the catalog entry carries the connector’s connect / status / disconnect webhooks in its auth block. The configuration app’s Add to catalog button writes it for you. If you create the entry by hand, paste that block into Auth Configuration: the platform adds it later on its own only for a workspace endpoint (ending in .mcp), never for the connector’s global /webhooks/mcp endpoint.

Agent builder

Goal: let an agent you build in Agent Creator read and act on Outlook mail, calendar and contacts through MCP tools.
Before an agent can call the connector, a Workspace builder must have installed and configured the Outlook app in a workspace (see the Workspace builder tab), and, for the central OAuth mode, a Platform admin must have provisioned the shared Microsoft Entra OAuth client (see the Platform admin setup accordion above).
This connector runs in the tenant app-instance context: your agent is authorized two ways at once: it is identified by the agent_id that Agent Creator injects through the capability Scope, and that agent must appear in the connector’s authorized-agents allowlist (managed in the configuration app). The Microsoft Graph access token itself is resolved server-side from the configured auth mode.There are two ways to wire it up. Pick based on how much isolation you need.

Option A: Enable the shared capability from the catalog

The fastest path: a Platform admin has already published an Outlook capability (see the Platform admin setup accordion above, §2), so you just pick it from the catalog. A workspace owner can publish it in one click with the config app’s Add to catalog button.
1

Open your agent in Agent Creator

Open the agent you want to extend and go to its capabilities / tools.
2

Add the Outlook capability

Browse the capability catalog, select Outlook, and enable it. The MCP endpoint URL and the Scope (context_id,agent_id,user_id,attachment_urls) are already wired by the admin; nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side.
3

Connect a Microsoft account (OAuth modes)

On the first tool call, an unconnected user is prompted to sign in; Agent Creator surfaces a connect_url. Application (clientCredentials) and accessToken modes need no per-user sign-in.
Convenient, but your agent runs against a shared, platform-managed instance: its Microsoft credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments.
For production agents, install the connector in your own workspace and point the agent at that workspace’s MCP endpoint.
Prefer this mode for security. Because the MCP runs in your app-instance context, the Microsoft credentials, the per-user OAuth tokens and the authorized-agents allowlist are all scoped to your workspace, not shared platform-wide. You decide exactly which agents may call it and which Microsoft account / auth mode backs them, and a misconfiguration elsewhere can never expose your mailbox. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary.
1

Install and configure the connector in your workspace

Follow the Workspace builder tab: install Outlook in your workspace, open its Configuration app, choose the auth mode and connect a Microsoft account.
2

Allowlist your agent

In that workspace’s config app, open the Agents tab and tick your agent under Authorized agents (the Install capability button does this for you).
3

Add the MCP capability to your agent

In your agent, add a capability pointing at your workspace’s MCP Endpoint URL, and set its Scope to:
The agent_id is what lets the connector identify and authorize your agent, and attachment_urls lets mail send attach files the user uploaded in the chat; without it, every call is rejected with an explicit “agent could not be identified” message. This Scope is separate from the Microsoft Graph OAuth scopes.
4

Connect a Microsoft account (OAuth modes)

On the first tool call, the user is prompted to sign in (or uses Connect in the config app).

Brief the agent in its system prompt

Whichever option you pick, wiring the capability is not enough: the agent must know the MCP exists and when to use it. Copy-pasteable starter:
Legacy AI Knowledge agents (no native MCP picker): add the connector under Advanced > Tools > MCP and paste the MCP Endpoint URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its agent_id.
Restricting to read-only (least privilege). Outlook tools cover both reads and writes (send mail, create/update events and contacts). The requested OAuth scopes are the grant, so the connector only ever obtains what the Scopes field in the configuration app asks for. To allow only read access, set a read-only scope list there, e.g.:
With central OAuth (oauthCentral) you do not create your own Entra client; keep oauthCentral and just enter the read-only scopes; your tenant scope overrides the platform default (the central app must expose these read permissions). Write calls (e.g. send mail) are then rejected by Microsoft Graph with 403 Forbidden. Note this is set at the workspace level: a workspace editor can widen it again; for a hard guarantee, use an Entra app limited to read permissions.

Available Tools

Each tool takes an action argument selecting the concrete operation, plus the per-action parameters. Omit userId to target the signed-in user (me).

Output Formats

Every tool accepts an outputFormat argument that controls the MCP response shape:
  • verbose (default): a human-readable text view, optimized for LLM consumption.
  • both: the structured payload, with its JSON also rendered as text.
  • structured: concise machine-readable JSON in structuredContent.

Tool Details

mail

Searching messages. search is a KQL full-text search (invoice, from:alice@contoso.com, subject:invoice received>=2026-10-01), sent to Microsoft Graph as one quoted string, so do not add quotes yourself: quotes inside the value are removed, so an exact-phrase search is not possible. Microsoft Graph does not combine it with filter, orderby or skip (a skip of 0 is ignored): the connector returns a clear error in those cases. Search results come newest first (an orderby of receivedDateTime desc or sentDateTime desc is ignored), and the next page is fetched with nextLink alone. When filter and orderby are used together on a date property, the connector puts that property first in the filter, as Microsoft Graph requires.
Bringing a mail attachment into the chat. attachToChat (messageId + attachmentId) downloads nothing: it proposes one file attachment, and the user is asked to confirm before it is added to the conversation. Only file attachments qualify (not attached emails, events or cloud links), and files larger than about 4 MB are refused; the agent should then point to the message link instead.

events

contacts

mailFolders


Security

The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on Connector security. This section lists what is specific to Outlook. With the default scopes, an agent can send mail and answer invitations in the user’s name (Mail.Send, Calendars.ReadWrite). Use the read-only preset unless the agents must send or organize mail. In clientCredentials mode, Microsoft Graph application permissions such as Mail.Read cover every mailbox of the tenant: if you use this mode, restrict the application to the mailboxes it needs in Exchange Online.

Error Handling

Common Issues

“This agent is not authorized to use this connector”: The calling agent is not in the allowlist. Open the configuration app, then the Agents tab, and tick this agent under Authorized agents (or enable Allow all agents) and Save. “The calling agent could not be identified”: The MCP capability Scope does not declare agent_id, so Agent Creator never injects the agent identity. Set the Scope to context_id,agent_id,user_id,attachment_urls on the capability, then allow the agent in the config app. “Microsoft Graph is not connected for this user”: No per-user OAuth token. Open the configuration app (OAuth mode) and click Connect, or use the agent’s connect flow. “Microsoft Graph token refresh failed … must reconnect”: The stored refresh token was revoked or expired (Microsoft Entra invalidated it, or it aged past its limit). The connection is dropped automatically; the user must reconnect from the config app. “Microsoft 365 connection was replaced while this token was being renewed. Retry — no reconnection needed.”: The user connected again while a request still held the previous token, and Microsoft Entra refused that previous token. The newer connection is kept, so nothing needs fixing: retry the request, it runs on the new connection. “Microsoft Graph not authenticated” / “OAuth is not configured”: Neither a tenant OAuth client nor the central platform client is available. Set the client ID/secret/tenant in the config app, or ask the platform maintainer to provision the central Entra OAuth client. client_credentials exchange failed: In application mode, check the Application (client) ID / secret, the tenant id, and that a Global Administrator granted admin consent for the application Graph permissions. Microsoft Entra redirect URI rejected: Entra rejects a colon in the redirect URI path. Register the redirect URI with the workspace’s raw id, not the slug: form: /workspaces/<core-workspace-id>/webhooks/oauthCallback for the platform client, /workspaces/<your-workspace-id>/webhooks/<app-instance>.oauthCallback for your own Entra app. Copy the exact value from the config app.

External Resources

Microsoft Graph API

Official reference for the Outlook mail, calendar and contacts REST APIs.

Tool Agents

Learn how Agent Creator agents consume MCP tools in Prisme.ai.