How to Connect Openclaw to Microsoft Teams

Image
Table of contents: [Show]

Quick Start

Microsoft Teams integration lets your Openclaw agent respond to messages in Teams channels and DMs. This guide walks you through installing the plugin and configuring authentication in under 5 minutes.

If you're new to Openclaw channel integrations, you might also want to read about Slack Integration for comparison.

Openclaw Microsoft Teams Integration

Step 1: Install the Microsoft Teams Plugin

Microsoft Teams support is not bundled with the core Openclaw install. You must install the extension plugin first via the CLI:

Openclaw plugins install @Openclaw/msteams

Step 2: Configure Credentials

Edit your ~/.Openclaw/Openclaw.json file to include your Microsoft Teams credentials and channel settings:

{ "channels": { "msteams": { "enabled": true, "appId": "YOUR_APP_ID", "appPassword": "YOUR_APP_PASSWORD", "tenantId": "YOUR_TENANT_ID", "webhook": { "port": 3978, "path": "/api/messages" }, "dmPolicy": "pairing", "groupPolicy": "allowlist" } } }

Alternatively, you can provide these credentials via environment variables:

export MSTEAMS_APP_ID="your-app-id" export MSTEAMS_APP_PASSWORD="your-app-password" export MSTEAMS_APP_TENANT_ID="your-tenant-id"

Step 3: Restart and Test

Restart your Openclaw gateway to apply the changes:

Openclaw gateway restart

Send a direct message to your bot in Teams. You should see the request in your Openclaw logs:

[msteams] Received message from user: Hello bot!

Example Interaction

User: @Openclaw summarize the quarterly report

Bot: Here's a summary of Q4 2025: Revenue up 23%, new enterprise clients: 15, churn rate: 2.1%...

Troubleshooting

  • Bot not responding: Verify your app registration in Azure AD has the correct redirect URI and permissions.
  • Authentication errors: Double-check your appId, appPassword, and tenantId match your Azure Bot Service configuration.
  • Webhook not receiving messages: Ensure port 3978 is open and your firewall allows inbound traffic.

For more deployment options, check out our guide on Fly.io Deployment.

Best Practices

  • Use pairing policy for DMs to require user approval before the bot responds.
  • Set groupPolicy to allowlist to restrict which Teams can access the bot.
  • Store credentials in environment variables for production deployments instead of the JSON config.
Openclaw WebChat Dashboard

Your Openclaw agent is now ready to handle Microsoft Teams conversations. For advanced configuration options, refer to the official documentation.