Skip to main content
HowOpenClaw

Microsoft Teams

Add your AI assistant to Microsoft Teams. OpenClaw integrates via the official Teams SDK — streaming replies, welcome cards, and full message management.

Microsoft Teams integration uses the official Teams SDK for enterprise-grade reliability. It provides AI-agent best practices including streaming replies, welcome cards with prompt starters, status updates, and native AI labeling.

Create the Azure Bot Service

  1. Go to portal.azure.com and sign in with your Microsoft account
  2. Click Create a resource → search for Azure Bot Service → click Create
  3. Fill in the resource name, subscription, resource group, and pricing tier (Free tier works for development)
  4. Choose Multi Tenant for standard Teams bots and click Create

Get your credentials

  1. Go to SettingsConfiguration → copy the Microsoft App ID
  2. Click Manage Password next to the App ID → New client secret → copy the secret value

Save them as environment variables:

export TEAMS_APP_ID="your-app-id"
export TEAMS_APP_PASSWORD="your-app-secret"

Register the bot with Teams

  1. In the Azure Bot Service, go to ChannelsMicrosoft Teams
  2. Accept the terms and Configure

Configure OpenClaw

Add the Teams channel to ~/.openclaw/openclaw.json:

{
  "channels": {
    "teams": {
      "enabled": true,
      "appId": "${TEAMS_APP_ID}",
      "appPassword": "${TEAMS_APP_PASSWORD}",
      "dmPolicy": "pairing",
      "groupPolicy": "mention",
      "requireMention": true
    }
  }
}

Restart and test

openclaw gateway restart
openclaw logs --filter teams

In a Teams chat, @mention your bot:

@YourBot are you there?

It should respond with a streaming reply.

Streaming Replies

OpenClaw streams 1:1 replies in real time. Users see your agent's response appear gradually as it's generated, providing better feedback than waiting for a complete response.

Enable streaming in your agent config:

{
  "channels": {
    "teams": {
      "streaming": true
    }
  }
}

Welcome Cards & Prompt Starters

When a user starts a conversation with your bot, they see a welcome card with suggested prompt starters. Configure these:

{
  "channels": {
    "teams": {
      "welcomeCard": {
        "title": "Welcome to My Assistant",
        "subtitle": "I'm here to help with your daily tasks",
        "promptStarters": [
          "What's on my calendar today?",
          "Summarize my recent emails",
          "Help me draft a response"
        ]
      }
    }
  }
}

Message Reactions

Your agent can now add reactions to messages and manage reactions in Teams. Reactions work in both 1:1 conversations and group chats.

Adding reactions

Your agent can react to messages with emoji:

{
  "channels": {
    "teams": {
      "allowMessageReactions": true
    }
  }
}

Listing and managing reactions

OpenClaw can list all reactions on a message and provide detailed metadata about who reacted with what emoji. This is useful for understanding conversation sentiment or polling responses.

Delegated OAuth setup

Reaction support includes improved OAuth setup with delegated permissions. If you're setting up Teams OAuth, you can now:

  1. Grant delegated (user-based) OAuth scopes for sending reactions
  2. Preserve application-auth read paths so the bot can still read messages without user delegation
  3. Mix read and write permission models — reads use application auth while writes use delegated auth

This gives you finer control over what the bot can do without requiring elevated application-level permissions for every operation.

Message Editing & Deletion

You can edit or delete messages your agent has sent. This includes in-thread fallbacks when no explicit target is provided.

{
  "channels": {
    "teams": {
      "allowMessageEdit": true,
      "allowMessageDelete": true
    }
  }
}

These settings are enabled by default.

Typing Indicators

Your agent sends typing indicators while processing, so users know it's working. This is enabled by default and provides better UX during longer operations.

Status Updates

The agent sends informative status updates during task execution:

  • Processing request...
  • Fetching calendar...
  • Composing reply...

These appear as the agent works, giving users visibility into what's happening.

AI Labeling

Teams natively labels messages from AI agents. Your agent will appear with an "AI" badge in the chat, making it clear to users that they're interacting with an assistant rather than a person.

Group Chats

To use your bot in a Teams group:

  1. Click ... on the group chat
  2. Choose @mentions and select your bot
  3. Start a conversation with @YourBot

Set groupPolicy to control how the bot behaves in groups:

{
  "channels": {
    "teams": {
      "groupPolicy": "mention"  // Respond only when mentioned
    }
  }
}

Graph Pagination (v2026.5.19)

As of v2026.5.19, Microsoft Graph API pagination is fully supported. When the bot fetches large result sets (like message histories or user lists), results are automatically paginated so you don't hit API limits.

Message Actions (v2026.5.19)

As of v2026.5.19, your agent can use Teams message actions: pin, unpin, read, react to a message, and list reactions. These are available as tools your agent can invoke during a conversation.

Channel Threading (v2026.5.19)

As of v2026.5.19, channel reply threading is now preserved in proactive fallback scenarios. This ensures that replies maintain proper conversation structure in Teams channels.

SDK Updates (v2026.5.19)

The deprecated Teams SDK HttpPlugin stub has been replaced with the modern httpServerAdapter. This eliminates recurring gateway deprecation warnings and keeps the Express 5 compatibility workaround on the supported SDK path.

Bot Framework Audience Token Validation (v2026.4.23)

Security fix in v2026.4.23

Shared Bot Framework audience tokens are now required to name the configured Teams app via a verified appid or azp claim. This blocks cross-bot token replay through the shared global Bot Framework audience — a token issued for a different Teams app can no longer be accepted on your bot. No config change is required if your appId matches the audience tokens your tenant actually issues. (#70724) Thanks @vincentkoc.

Recent Fixes (v2026.5.19)

  • Media downloads restored for personal DMs, Bot Framework a: conversations, OneDrive/SharePoint shared files, and Graph-backed chat IDs
  • Bot Framework audience tokens now accepted
  • Long tool chains kept alive with typing indicators
  • SSO sign-in callbacks added
  • Parent context injected for thread replies
  • Cron announcements delivered to Teams conversation IDs
  • Feedback-learning filename collisions prevented
  • Slack — easier setup for smaller teams not on Microsoft infrastructure
  • Discord — better for communities and open servers

Security Recommendations

Restrict bot access. Don't add your bot to every team and channel. Start with a pilot group.

Use Azure AD groups. For enterprise deployments, use Azure AD for access control rather than allowlists.

Store secrets in Azure Key Vault. Never commit appPassword to version control. Use environment variables or Azure Key Vault.

Enable message validation. Teams validates all incoming messages with a cryptographic signature. OpenClaw verifies this automatically.


Something not working?

Check the troubleshooting guide for common issues with gateway startup, channel connections, and automations.

FAQ

Do I need an Azure account to set up the Teams bot?
Yes — but Azure has a free tier that covers everything needed for a personal bot. Create a free Azure account at portal.azure.com, then create an Azure Bot Service resource. The free tier handles the registration and credential management without any ongoing cost for development use.
Does this work with the free version of Microsoft Teams?
Yes. The free Microsoft Teams plan supports adding bots and apps. Bot messaging in 1:1 chats works on all plan tiers. Some advanced features like group channel bots may require a paid Microsoft 365 plan, but personal DM use with the bot works on the free plan.
Can the bot respond in Teams group chats?
Yes. @mention the bot in any group chat it's been added to, and it will respond. You can configure which team channels it monitors in openclaw.json. The bot supports streaming replies — you see the response being typed in real time, the same way co-pilots appear in Teams.