Teams MCP - Flows — Unique AI Documentation

Teams MCP - Flows

User Connection Flow

Everything starts when a user connects to the MCP server. This triggers OAuth authentication. After authentication, the user can start the KB integration via the start_kb_integration tool to begin receiving meeting notifications. Alternatively, operators can enable MICROSOFT_AUTO_START_INGESTION, in which case every login automatically enqueues a transcript subscription (no tool call required).

OAuth Scopes Required: See Microsoft Graph Permissions for detailed justification.

Important: Microsoft access and refresh tokens are never sent to the client. They are received by the server, encrypted, and stored securely. After the Microsoft OAuth flow completes, the server issues opaque JWT tokens to the client for MCP authentication.

Microsoft OAuth Setup Flow

The following sequence shows the complete Microsoft OAuth authentication flow with detailed token handling:

Microsoft Token Refresh Flow

Microsoft tokens are refreshed on-demand when the Graph API returns a 401 error:

Subscription Lifecycle

Subscriptions are renewed (not recreated) before they expire. If renewal fails for any reason, the subscription is deleted and the user must reconnect to the MCP server to re-authenticate.

Subscription Scheduling:

Transcript Processing Flow

When a meeting transcript becomes available, Microsoft Graph sends a webhook notification. The recording is fetched if available (correlated by contentCorrelationId).

Webhook Validation:

Recording Handling:

Access Control:

Chat Flows

The Chat Module exposes a synchronous request/response tool surface. Each tool call is handled inline — there is no queue or background worker. This is distinct from the async webhook/transcript ingestion path above.

Each tool targets a chat or channel by id: list_* tools return identifiers that the caller passes to subsequent get_*_messages or send_*_message calls. See also: Tools Reference.

Chat Read Flow

The read flow applies to both personal chats (list_chats → get_chat_messages) and team channels (list_teams → list_channels → get_channel_messages). The diagram below shows the personal chat variant; the channel variant substitutes list_teams/list_channels for list_chats and queries /teams/{teamId}/channels/{channelId}/messages instead of /chats/{chatId}/messages.

Key points:

Chat Search Flow

search_messages queries the Microsoft Search API (POST /search/query on Graph v1.0) and optionally hydrates each hit with its full message body.

Key points:

Chat Send Flow

The send flow applies to personal chats (send_chat_message) and team channels (send_channel_message). The caller must first obtain the target ID via a list_* call.

Key points:

Related Documentation

Standard References