OpenClaw Microsoft Teams Channel
Connect OpenClaw to Microsoft Teams using the Bot Framework via an Azure Bot Resource. This plugin-based integration lets your AI assistant operate in Teams — handling personal DMs, group chats, and channel conversations. OpenClaw receives webhook events from the Bot Framework at /api/messages and responds through the Teams messaging API, supporting threaded replies, Adaptive Cards, reactions, file sharing via SharePoint, and per-team/per-channel configuration overrides.
Microsoft Teams Supported Features
Text Messages
Supported
Media & Files
Supported
Reactions
Supported
Threads
Supported
Voice Messages
Not Supported
Group Chat
Supported
Microsoft Teams Prerequisites
- An Azure account with permissions to create an Azure Bot resource
- A registered Azure Bot with App ID, App Password (client secret), and Tenant ID (single-tenant recommended)
- A Teams App Manifest (manifest.json) with bot configuration, scopes, and icons (outline.png 32×32, color.png 192×192)
- OpenClaw Gateway running and accessible via a public HTTPS URL or tunnel (default webhook port 3978)
- The Teams plugin installed: openclaw plugins install @openclaw/msteams
Microsoft Teams Quick Setup
Create an Azure Bot resource
Go to the Azure Portal → Create a resource → Search 'Azure Bot'. Create with Single Tenant type. In the App Registration, generate a client secret. Copy the App ID, client secret, and Tenant ID — you'll need all three for OpenClaw configuration.
Install the Teams plugin and configure
Run 'openclaw plugins install @openclaw/msteams' to install the plugin. Add the Teams channel configuration to your openclaw.json with appId, appPassword, and tenantId. You can also use environment variables MSTEAMS_APP_ID, MSTEAMS_APP_PASSWORD, and MSTEAMS_TENANT_ID.
Set the messaging endpoint and enable Teams channel
In the Azure Portal, navigate to your Bot resource → Configuration. Set the messaging endpoint to 'https://<your-domain>/api/messages'. Then go to Channels → Add Microsoft Teams → Configure. For local development, use a tunnel (ngrok or Tailscale Funnel) to expose port 3978.
Create and install the Teams App
Create a manifest.json with your bot's App ID as botId, scopes (personal, team, groupChat), and RSC permissions. Zip it with outline.png and color.png. Upload via Teams Developer Portal or Teams Admin Center. For testing, sideload the app package.
Test the bot
Find your bot in Teams and send it a direct message. If using the default pairing policy, approve the sender via 'openclaw pairing approve msteams <code>' in your terminal. The bot should respond with AI-generated replies.
Microsoft Teams Configuration Example
{
"channels": {
"msteams": {
"enabled": true,
"appId": "YOUR_APP_ID",
"appPassword": "YOUR_APP_PASSWORD",
"tenantId": "YOUR_TENANT_ID",
"webhook": {
"port": 3978,
"path": "/api/messages"
}
}
}
}Microsoft Teams Deep Dive
Architecture Overview
Azure Bot Setup & App Registration
{
"channels": {
"msteams": {
"appId": "<APP_ID>",
"appPassword": "<APP_PASSWORD>",
"tenantId": "<TENANT_ID>"
}
}
}Teams App Manifest & RSC Permissions
DM Policies
{
"channels": {
"msteams": {
"dmPolicy": "allowlist",
"allowFrom": [
"user@org.com",
"40a1a0ed-4ff2-4164-a219-55518990c197"
]
}
}
}Group Chat & Channel Management
{
"channels": {
"msteams": {
"groupPolicy": "allowlist",
"groupAllowFrom": ["user@org.com"],
"teams": {
"My Team": {
"channels": {
"General": {
"requireMention": true
}
}
}
}
}
}
}Reply Styles & Threading
{
"channels": {
"msteams": {
"replyStyle": "thread",
"teams": {
"19:abc...@thread.tacv2": {
"channels": {
"19:xyz...@thread.tacv2": {
"replyStyle": "top-level"
}
}
}
}
}
}
}File Handling & SharePoint
{
"channels": {
"msteams": {
"sharePointSiteId": "YOUR_SHAREPOINT_SITE_ID",
"mediaAllowHosts": ["*.microsoft.com", "*.sharepoint.com"],
"mediaAuthAllowHosts": ["graph.microsoft.com"]
}
}
}Adaptive Cards & Polls
Teams ID Extraction
Microsoft Teams Configuration Reference
| Key | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | true | Enable or disable the Microsoft Teams channel |
| appId | string | "" | Azure Bot App ID (Microsoft App ID). Can also use MSTEAMS_APP_ID env var |
| appPassword | string | "" | Azure Bot client secret. Can also use MSTEAMS_APP_PASSWORD env var |
| tenantId | string | "" | Azure AD Tenant ID for single-tenant authentication. Can also use MSTEAMS_TENANT_ID env var |
| webhook.port | number | 3978 | Port for the webhook listener that receives Bot Framework events |
| webhook.path | string | "/api/messages" | Webhook endpoint path for incoming Bot Framework messages |
| dmPolicy | string | "pairing" | Controls who can DM the bot. Options: pairing, allowlist, open, disabled |
| allowFrom | string[] | [] | AAD object IDs, UPNs, or display names allowed to DM the bot (when dmPolicy is allowlist) |
| groupPolicy | string | "allowlist" | Group/channel access control. Options: allowlist, open, disabled |
| groupAllowFrom | string[] | [] | Senders permitted in group chats. Falls back to allowFrom if not set |
| teams | object | {} | Per-team and per-channel configuration overrides (replyStyle, requireMention, tools) |
| requireMention | boolean | true | Require @mention in channels and group chats. Set false with RSC permissions to respond to all messages |
| replyStyle | string | "thread" | Reply layout style. Options: thread (classic Posts), top-level (Slack-like Threads) |
| configWrites | boolean | true | Allow /config set|unset commands to modify channel settings at runtime |
| textChunkLimit | number | — | Maximum characters per outbound message before chunking |
| chunkMode | string | "length" | Text chunking strategy. Options: length (hard split), newline (paragraph-aware) |
| sharePointSiteId | string | "" | SharePoint site ID for group chat/channel file uploads |
| mediaAllowHosts | string[] | MS/Teams domains | Allowed hosts for downloading media attachments |
| mediaAuthAllowHosts | string[] | Graph + Bot Framework | Hosts that receive Authorization headers when downloading media |
| dmHistoryLimit | number | 50 | Number of recent DM messages included as AI context per conversation |
| historyLimit | number | 50 | Maximum channel/group messages included as AI context |
Enable or disable the Microsoft Teams channel
Azure Bot App ID (Microsoft App ID). Can also use MSTEAMS_APP_ID env var
Azure Bot client secret. Can also use MSTEAMS_APP_PASSWORD env var
Azure AD Tenant ID for single-tenant authentication. Can also use MSTEAMS_TENANT_ID env var
Port for the webhook listener that receives Bot Framework events
Webhook endpoint path for incoming Bot Framework messages
Controls who can DM the bot. Options: pairing, allowlist, open, disabled
AAD object IDs, UPNs, or display names allowed to DM the bot (when dmPolicy is allowlist)
Group/channel access control. Options: allowlist, open, disabled
Senders permitted in group chats. Falls back to allowFrom if not set
Per-team and per-channel configuration overrides (replyStyle, requireMention, tools)
Require @mention in channels and group chats. Set false with RSC permissions to respond to all messages
Reply layout style. Options: thread (classic Posts), top-level (Slack-like Threads)
Allow /config set|unset commands to modify channel settings at runtime
Maximum characters per outbound message before chunking
Text chunking strategy. Options: length (hard split), newline (paragraph-aware)
SharePoint site ID for group chat/channel file uploads
Allowed hosts for downloading media attachments
Hosts that receive Authorization headers when downloading media
Number of recent DM messages included as AI context per conversation
Maximum channel/group messages included as AI context
Microsoft Teams Frequently Asked Questions
Microsoft Teams Troubleshooting
Graph API permissions have not been granted or admin consent is missing. The bot receives a content stub instead of the actual file.
The bot requires @mention by default in channels and group chats, or RSC permissions are not configured.
Teams caches app metadata aggressively. Old manifest is still in use.
The appId, appPassword, or tenantId in OpenClaw config doesn't match the Azure Bot registration, or testing manually without proper Azure JWT tokens.
Microsoft Teams historically had limited bot support in private channels. As of early 2026, Microsoft is rolling out expanded app support for private channels, but it may not yet be available in all tenants.