Connect Microsoft 365 and Slack

Add the Outlook, Microsoft Teams, SharePoint, and Slack Connectors with your own app registration, so each member can use their own account in chat.

Agentic Friendly

The Outlook, Microsoft Teams, SharePoint, and Slack presets add Connectors that act as each member, with that member's own Microsoft or Slack account. This page is for the tenant administrator who adds them. Members then link their own accounts, as described in Link your credential to a Connector.

Microsoft Entra ID and Slack do not let the platform register itself as an OAuth client. You register an app with the provider and enter it on the Connector as its app registration. Members sign in through that app when they link.

What the Connectors can do

PresetRuntimeUpstreamWhat a member can do
OutlookManagedMicrosoft GraphRead mail, mail folders, and attachment lists. Read calendars and events. Create draft emails and draft replies
Microsoft TeamsManagedMicrosoft GraphRead their chats, the teams and channels they belong to, and channel messages and replies
SharePointManagedMicrosoft GraphSearch content, and browse sites, document libraries, folders, files, and lists
SlackRemotehttps://mcp.slack.com/mcpSearch public channels and users, and read public channels and threads

None of the four Connectors can send, post, or delete. Two controls enforce this:

  • Least-privilege scopes. Each preset requests only the permissions its tools need. No preset requests a permission to send mail or post messages.
  • A prefilled tool allowlist. Each preset fills in the Connector's tool allowlist with its read tools, plus two draft tools for Outlook. The MCP Gateway applies the allowlist on every call, from chat, from an Agent, and from an external MCP client.

Outlook needs Mail.ReadWrite to create drafts. That permission also allows changing and deleting mail, but not sending it. The allowlist is what limits the Outlook Connector to reading and drafting, so review any tool before you add it to that allowlist. A draft stays a draft until the member sends it from Outlook.

The Teams and SharePoint presets also start their server in read-only mode, which refuses every write whatever the permissions allow.

Every call uses the calling member's own account, so Microsoft Graph and Slack return only what that member can already see. Content that a tool returns passes through the MCP Gateway into the conversation's model, like the results of any other Connector.

Allowed tools

PresetTools in the prefilled allowlist
Outlookget-current-user, list-mail-folders, list-mail-messages, list-mail-folder-messages, get-mail-message, read-mail-text, list-mail-attachments, list-calendars, list-calendar-events, get-calendar-event, get-calendar-view, create-draft-email, create-reply-draft
Microsoft Teamsget-current-user, list-chats, get-chat, list-chat-messages, get-chat-message, list-chat-message-replies, list-joined-teams, get-team, list-team-channels, get-team-channel, list-channel-messages, get-channel-message, list-channel-message-replies
SharePointget-current-user, search-query, search-sharepoint-sites, get-sharepoint-site, get-sharepoint-site-by-path, list-sharepoint-site-drives, get-drive-root-item, list-folder-files, get-drive-item, list-sharepoint-site-lists, list-sharepoint-site-list-items, get-sharepoint-site-list-item
Slackslack_search_public, slack_search_channels, slack_read_channel, slack_read_thread, slack_search_users

Before you start

You need:

  • mcp.server.create in the tenant. Tenant administrators have it. See the MCP permission catalogue.
  • An OAuth redirect URI configured for the deployment. The platform operator sets it.
  • For Microsoft, a Microsoft Entra role that can register applications and grant tenant-wide admin consent, such as Application Administrator or Cloud Application Administrator.
  • For Slack, the right to create and install apps in the workspace. If the workspace requires approval for apps, a workspace admin approves the installation.

The platform needs this network access:

FromToFor
BSQAI API and MCP Gatewaylogin.microsoftonline.comMicrosoft sign-in and token renewal
Microsoft Connector workloadsgraph.microsoft.comMicrosoft Graph calls
Clusterghcr.ioPulling the Microsoft Connector image, unless you mirror it
BSQAI API and MCP Gatewaymcp.slack.com and slack.comSlack tools, sign-in, and token renewal

With the platform's network policies on, the BSQAI API, the MCP Gateway, and the Connector workloads reach addresses outside the cluster only within NETWORK_POLICY_EXTERNAL_EGRESS_CIDRS, on TCP ports 443 and 80 by default. The default address range, 0.0.0.0/0, allows every address. If your site narrows those addresses, include the ranges of Microsoft sign-in and Microsoft Graph, and of Slack, for the BSQAI API, the MCP Gateway, and the Connector workloads.

Get the redirect URI

After a member signs in, the provider sends the browser back to the Portal at the deployment's redirect URI. Register that exact address with the provider's app.

  1. In the Portal sidebar, select Connectors.
  2. Select Add connector, then select the preset.
  3. In Use your own app registration, copy the Redirect URI.

The address is the same for every Connector in the deployment. If the Portal reports that the deployment has no OAuth redirect URI, ask the platform operator to configure one. Members cannot link these Connectors until then.

The redirect URI is also available from the BSQAI API, with mcp.server.read:

curl "https://api.<platform-domain>/v1/mcp/oauth/redirect-uri" \
  -H "Authorization: Bearer $BSQAI_TOKEN"

The response is {"redirect_uri": "https://<portal-host>/app/mcp/oauth/callback"}, or {"redirect_uri": null} when the deployment has none.

Register an app in Microsoft Entra ID

One app registration can serve all three Microsoft Connectors if you give it the permissions of every preset you use. Each Connector keeps its own copy of the client ID, client secret, and scopes.

  1. In the Microsoft Entra admin center, open App registrations and select New registration.

  2. Enter a name. Under Supported account types, select the single-tenant option, so that only accounts in your organization can sign in.

  3. Under Redirect URI, select the Web platform and paste the redirect URI from the Portal.

  4. Register the app. On its Overview page, copy the Application (client) ID and the Directory (tenant) ID.

  5. Under Certificates & secrets, add a new client secret. Copy its Value immediately, because Microsoft Entra ID does not show it again. Do not use the Secret ID. Record the expiry date.

  6. Under API permissions, add the Microsoft Graph delegated permissions for each preset you use.

    PresetDelegated permissions
    Outlookoffline_access, User.Read, Mail.ReadWrite, Calendars.Read
    Microsoft Teamsoffline_access, User.Read, Chat.Read, ChannelMessage.Read.All, Team.ReadBasic.All, Channel.ReadBasic.All
    SharePointoffline_access, User.Read, Sites.Read.All, Files.Read.All
  7. Grant admin consent for your organization. ChannelMessage.Read.All always requires it. When you grant consent for every permission, members do not see a consent prompt when they link.

Do not add Mail.Send or any other permission that sends, posts, or deletes.

Create a Slack app

  1. At https://api.slack.com/apps, create a new app from scratch in your workspace. Keep it internal to the workspace. Slack lets only internal apps and directory-published apps use MCP.
  2. In the Agents section of the app settings, turn on Slack Model Context Protocol (MCP) Server.
  3. Under OAuth & Permissions, add the redirect URI from the Portal to Redirect URLs and save.
  4. On the same page, add these User Token Scopes: search:read.public, channels:history, channels:read, search:read.users, and users:read.
  5. Leave PKCE turned off. Turning PKCE on marks the app as a public client, and only Slack support can turn it off again.
  6. Install the app in the workspace. If the workspace requires approval for apps, request the installation and wait for a workspace admin to approve it.
  7. On the Basic Information page, copy the Client ID and the Client Secret.

If the app restricts token use to allowed IP address ranges, Slack applies the same restriction to MCP calls. Include the outbound addresses of the MCP Gateway and the BSQAI API in those ranges.

Add the Connector

  1. Open Connectors, select Add connector, and select the preset.

  2. Review the name and display name. The name is permanent once saved.

  3. In Use your own app registration, fill in the fields.

    FieldMicrosoft presetsSlack
    Client IDThe Application (client) IDThe Client ID
    Client secretThe secret ValueThe Client Secret
    ScopesKeep the prefilled scopesKeep the prefilled scopes
    Authorization serverhttps://login.microsoftonline.com/<tenant-id>/v2.0, with your Directory (tenant) IDhttps://mcp.slack.com, which the preset fills in
  4. Review the Tool allowlist card, which lists the tools the Connector allows.

  5. Save the Connector.

Every app registration needs an authorization server, because the client secret and members' sign-ins only ever go to the authorization server you name. It must be an https:// address. For a Microsoft Connector, it must be your tenant's own issuer. The shared organizations and common addresses are refused.

A Microsoft Connector is a Managed Server. Wait until its status reads Ready. Its Image field holds ghcr.io/softeria/ms-365-mcp-server, pinned by digest. If the cluster cannot reach ghcr.io, copy the image to a registry that the cluster can reach, and point Image at the copy.

Each member links their own account:

  1. Open Connectors and select the Connector.
  2. Select Link with OAuth.
  3. Sign in to Microsoft or Slack with their own account and approve access. Microsoft does not ask again for permissions that an administrator consented to for the organization.
  4. The provider returns the member to the Portal, which confirms the link.

The Connector's tools stay hidden from a member until they link. A Microsoft Connector accepts only accounts in your tenant.

Unlink deletes the member's credential from BullSequana AI. It does not revoke the app's access at Microsoft or Slack.

Rotate a client secret

Rotating only the client secret does not affect members.

  1. Create a new client secret at the provider. In Microsoft Entra ID, add it under Certificates & secrets before the current one expires. In Slack, the client secret is on the app's Basic Information page.
  2. Open the Connector and select Edit Connector.
  3. In Client secret, enter the new value. An empty field keeps the stored secret.
  4. Save the change. Repeat for every Connector that uses the same app.
  5. In Microsoft Entra ID, delete the old secret.

If a secret expires before you replace it, the provider rejects the app. Sign-ins and token renewals then fail with mcp_oauth_client_rejected. Members' links stay in place and work again after you save a valid secret.

Change the app registration

When you change a Connector's Client ID or Authorization server, enter the client secret again in the same edit. Without it, the save is refused with mcp_server_oauth_client_invalid.

After such a change, members link again once their current access expires. Adding or removing the app registration has the same effect.

Troubleshoot linking

SymptomCauseWhat to do
Sign-in stops on an error page at Microsoft or Slack, and the member never returns to the PortalThe Client ID is wrong, or the provider's app does not have the exact redirect URI. The provider then never redirects back, so the member sees the provider's message, not the platform'sCheck the Client ID. Add the exact Redirect URI shown in the Connector form to the provider's app. In Microsoft Entra ID, add it for the Web platform
mcp_oauth_access_deniedThe member canceled sign-in, or the provider requires an approval the member cannot giveLink again. For Microsoft, grant admin consent. For Slack, have a workspace admin approve the app
mcp_oauth_client_rejectedThe provider rejected the app: a wrong client ID, a wrong or expired client secret, or missing permissionsCheck the Client ID and enter a valid secret. For Microsoft, use the secret Value, not the Secret ID
mcp_server_oauth_client_invalidThe Connector's app registration cannot be used, for example because the authorization server is not the provider's exact issuerCorrect the field that the message names. For Microsoft, use https://login.microsoftonline.com/<tenant-id>/v2.0
mcp_server_oauth_client_unreadableThe platform cannot read the client secret stored on the ConnectorEdit the Connector and enter the client secret again
mcp_oauth_upstream_errorThe provider could not be reached or gave no usable answer. A Connector without an app registration also fails this way, because neither provider supports automatic registrationCheck that the Connector has its app registration and that the platform can reach the provider, then try again
mcp_oauth_state_invalidThe sign-in took longer than ten minutes, was used twice, or the Connector's Client ID changed during itStart again from the Connector
mcp_credential_expiredThe member's link can no longer be renewed, for example because their access was revoked, or because the Connector's Client ID or Authorization server changedThe member links again
A Microsoft Connector stays Not readyThe cluster cannot pull the imageMake ghcr.io reachable, or mirror the image and update Image

On this page