Microsoft Teams

The Microsoft Teams connector lets AI agents read channels and messages, send messages to channels and chats, manage channels, and upload files — all through the Microsoft Graph API using OAuth 2.0. Your credentials are stored encrypted in MCPGate's vault and are never exposed to the AI client.

Required scopes#

MCPGate requests the following Microsoft Graph OAuth scopes when you connect a Teams account. All scopes are requested up front so you don't need to re-authorise when enabling additional tools.

ScopePurpose
Team.ReadBasic.AllList teams the user has joined
Channel.ReadBasic.AllRead channel names and membership
ChannelMessage.Read.AllRead messages in channels
ChannelMessage.SendSend and reply to channel messages
Channel.CreateCreate new channels in a team
Channel.Delete.AllDelete channels from a team
Chat.ReadWriteRead and send messages in chats
Files.ReadWrite.AllUpload files to Teams channels
TeamMember.Read.AllList members of a team

Tool reference#

The Teams connector exposes 12 tools: 6 read, 5 write, and 1 delete. Use the MCP Apps page to enable or disable individual tools per app, and the Guardrails page to add fine-grained rules on top.

ToolCategoryDescription
teams_list_teamsreadList all Microsoft Teams the user has joined
teams_list_channelsreadList all channels in a team
teams_list_messagesreadList messages in a channel
teams_get_messagereadGet a specific message from a channel
teams_list_membersreadList members of a team
teams_list_chatsreadList all chats for the authenticated user
teams_send_messagewriteSend a message to a Teams channel
teams_reply_to_messagewriteReply to a message in a Teams channel
teams_create_channelwriteCreate a new channel in a team
teams_upload_filewriteUpload a file to a Teams channel
teams_send_chatwriteSend a message in a Teams chat
teams_delete_channeldeleteDelete a channel from a team

Protect channel deletion

teams_delete_channelpermanently removes a channel and all its messages and files. Always deny this tool in apps that don't explicitly require it. The block_delete guardrail template makes this one click.

Common guardrail recipes#

Read-only access#

Enable only the six read tools and deny all write and delete tools. This is the safest configuration for agents that monitor channels, summarise discussions, or search for information without modifying anything.

Participate preset#

Enable read tools plus teams_send_message, teams_reply_to_message, and teams_send_chat. Deny channel management tools (teams_create_channel, teams_upload_file, teams_delete_channel). This lets the agent participate in conversations without structural changes to the workspace.

Restrict to specific channels#

Apply the allow_values template to teams_send_message and teams_reply_to_message, targeting the channel_id field. Provide a list of channel IDs the agent is permitted to post to. Requests targeting any other channel are denied before the API call is made.

Troubleshooting#

  • 403 on private channels — Private channels require additional consent. Disconnect and reconnect to trigger a fresh consent screen that includes private channel permissions.
  • Channel not found after creation — Newly created channels can take a few seconds to propagate in Teams. Retry teams_list_channels after a brief delay.
  • File upload failsteams_upload_file requires the channel to have a SharePoint site provisioned. Channels created very recently may not have their site ready yet.