Skip to main content

Overview

The Microsoft Teams integration lets users connect their Microsoft account so Alysio can list their teams, team channels, channel messages, chats, and chat messages on their behalf. Users can ask Alysio to get teams they’ve joined, list channels for a team, get messages in a channel, list their chats, and get messages in a chat—all in natural language. The integration uses the user’s connected Microsoft account via OAuth 2.0 and calls the Microsoft Graph API. Use microsoft_teams_get_teams first to get team IDs, then microsoft_teams_get_teams_channels for channel IDs when fetching channel messages; use microsoft_teams_get_chats to get chat IDs for chat messages. Supported capabilities / objects
  • Teams — List teams the current user has joined (Microsoft Graph me/joinedTeams).
  • Channels — List channels for a specific team (optional filter, select); get channel messages (optional top, expand).
  • Chats — List the user’s chats (optional expand, top, filter, orderBy); get messages for a specific chat (optional top, orderBy, filter).

Authentication

Method: OAuth 2.0 (Microsoft / Azure AD). The MCP sends requests using a Bearer token and a credential ID that identifies the user’s connected Microsoft account. Requests go to the Microsoft Graph API for Teams and chats. Redirect URI: Configured when the Microsoft Teams integration is set up in Alysio. The Azure AD app must allow this redirect URI. Token handling
  • OAuth tokens for the connected Microsoft account are stored securely and refreshed automatically.
  • Each user/tenant has their own credential; the MCP sends the appropriate credential ID with each request so calls are isolated per connection.
  • On disconnect, that credential is no longer used and Microsoft Teams tools will not be available until the user reconnects.
Required permissions (Microsoft Graph) Typical delegated permissions for the current tools:
  • User.Read — Read signed-in user profile.
  • Team.ReadBasic.All — Read basic properties of teams the user belongs to (list joined teams).
  • Channel.ReadBasic.All — Read channel names and metadata (list channels).
  • ChannelMessage.Read.All — Read channel messages (or ChannelMessage.Read.Group if scoped to teams the user belongs to).
  • Chat.Read — Read user’s chats and chat messages.
Scope justification
PermissionPurpose
User.ReadRequired for /me context (joined teams, chats).
Team.ReadBasic.AllList teams the user has joined.
Channel.ReadBasic.AllList channels in a team.
ChannelMessage.Read.All (or .Group)Get channel messages.
Chat.ReadList chats and get chat messages.
Connection required: Users must connect Microsoft Teams (Microsoft account) in Alysio before Microsoft Teams tools work. If the connection is missing or expired, re-authorize in Settings → Integrations.
Query parameters: Channel and chat message endpoints support optional OData-style query parameters (e.g. $top, $expand, $filter, $orderby, $select); the tools pass these through where the models allow.

MCP Tools

The Microsoft Teams MCP exposes the following tools. Users can invoke these capabilities through natural language in Alysio.
ToolDescriptionExample user prompts
microsoft_teams_get_teamsLists teams the current user has joined (Microsoft Graph me/joinedTeams).”List my Teams teams”, “What teams am I in?”
microsoft_teams_get_teams_channelsLists channels for a specific team; optional filter (e.g. by displayName) and select. Requires team_id from get_teams.”Channels in this team”, “List channels for team X.”
microsoft_teams_get_channel_messagesGets messages for a specific team channel; optional top (1–50) and expand. Requires team_id and channel_id.”Messages in General channel”, “Recent channel messages.”
microsoft_teams_get_chatsLists the current user’s chats; optional expand (members, lastMessagePreview), top (1–50), filter, orderBy.”List my Teams chats”, “Show my recent chats.”
microsoft_teams_get_chat_messagesGets messages for a specific chat; optional top (1–50), orderBy, filter (e.g. lastModifiedDateTime). Requires chat_id from get_chats.”Messages in this chat”, “Recent messages in chat X.”

App Behavior

  • API calls are made on-demand only when the user asks something that requires Microsoft Teams data (e.g. teams, channels, channel messages, chats, chat messages). There is no background sync; each request triggers the relevant Microsoft Graph API call using the user’s OAuth credential.
Example flow
  1. User asks: “Show the last 10 messages from the General channel in my Engineering team.”
  2. Alysio routes the request to the Microsoft Teams MCP.
  3. The MCP may call microsoft_teams_get_teams to find the Engineering team ID, then microsoft_teams_get_teams_channels with that team_id (and optionally filter by displayName eq ‘General’) to get the channel ID, then microsoft_teams_get_channel_messages with team_id, channel_id, and top=10.
  4. The request is sent to Microsoft Graph using the user’s stored OAuth credential.
  5. The MCP returns the channel messages; Alysio presents them in chat.

Troubleshooting

Common issues
  • Missing or expired connection — User sees errors or no Teams data. Fix: Reconnect Microsoft Teams (Microsoft account) in Settings → Integrations (re-authorize via OAuth 2.0).
  • 401 Unauthorized — Token invalid or expired. Fix: Re-authorize the integration in Settings → Integrations.
  • 403 Forbidden — Insufficient Microsoft Graph permissions. Fix: Ensure the Azure AD app has the required delegated permissions (e.g. User.Read, Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All or .Group, Chat.Read) and that the user has consented.
  • Need team_id or channel_id — get_teams_channels and get_channel_messages require team_id; get_channel_messages also requires channel_id. Fix: Call microsoft_teams_get_teams to get team IDs, then microsoft_teams_get_teams_channels with that team_id to get channel IDs.
  • Need chat_id — get_chat_messages requires chat_id. Fix: Call microsoft_teams_get_chats to get chat IDs, then pass the desired chat_id to get_chat_messages.
Support