Microsoft Teams Setup
Enterprise-ready integration using the Azure Bot Framework.
New to channel setup? For a hands-on, step-by-step tutorial, check out our ''Channel Setup Tutorial''. This page is a comprehensive reference covering all Microsoft Teams features and configuration options.
Microsoft Teams is a collaboration platform for enterprises. OpenClaw integrates with Teams using the Microsoft Bot Framework, providing chat, channels, and enterprise-grade features.
Quick Setup
Setting up Microsoft Teams requires creating a bot in Azure Portal:
- Create a Teams app in Azure Portal
- Configure Bot Framework
- Get bot credentials
- Configure in OpenClaw
- Deploy to Teams
Creating a Teams Bot
Step 1: Azure Portal Setup
- Go to Azure Portal
- Create a new "Azure Bot" resource
- Choose "Multi Tenant" or "Single Tenant" based on your needs
- Configure Microsoft App ID and password
- Set messaging endpoint (your OpenClaw Gateway URL)
Step 2: Bot Framework Configuration
- In Azure Bot resource, go to "Channels"
- Add Microsoft Teams channel
- Configure Teams-specific settings
- Copy the Microsoft App ID and password
Step 3: Teams App Manifest
Create a Teams app manifest with your bot details. This manifest defines your bot's capabilities and appearance in Teams.
Configuration
Configure Microsoft Teams in your OpenClaw configuration file:
Microsoft Teams Configuration
{
"msteams": {
"appId": "your-microsoft-app-id",
"appPassword": "your-microsoft-app-password",
"allowFrom": ["[email protected]", "[email protected]"]
}
}Environment Variables
You can also use environment variables:
export MSTEAMS_APP_ID="your-microsoft-app-id" export MSTEAMS_APP_PASSWORD="your-microsoft-app-password"
Access Control
User Allowlist
Control who can interact with your bot:
{
"msteams": {
"appId": "your-microsoft-app-id",
"appPassword": "your-microsoft-app-password",
"allowFrom": [
"[email protected]",
"[email protected]"
]
}
}Group Access Control
Configure group chat access:
{
"msteams": {
"appId": "your-microsoft-app-id",
"appPassword": "your-microsoft-app-password",
"groupAllowFrom": ["[email protected]"],
"groupPolicy": "open"
}
}Group Policies:
"open"- Bot responds to all group messages"allowlist"- Only respond in groups listed ingroupAllowFrom
Teams Features
OpenClaw supports various Teams Features:
- 1-on-1 Chats - Direct conversations with users
- Team Channels - Participate in team channels
- Group Chats - Multi-user conversations
- Mentions - Respond when mentioned in channels
- File Sharing - Send and receive files
- Rich Cards - Interactive message cards
Deployment
Deploy to Teams
- Package your Teams app manifest
- Upload to Teams (via App Studio or directly)
- Install to your organization or specific teams
- Test bot functionality
Messaging Endpoint
Your OpenClaw Gateway must be accessible from the internet for Teams to send messages. Configure:
- Public URL for your Gateway
- HTTPS endpoint (required by Teams)
- Valid SSL certificate
Security Best Practices
- 1Secure CredentialsNever share your App ID and password.
- 2Use AllowlistsAlways configure
allowFromto control access. - 3HTTPS RequiredTeams requires HTTPS for messaging endpoints.
- 4Regular UpdatesKeep your Teams app and OpenClaw updated.
- 5Audit LogsMonitor bot interactions for security.
Troubleshooting
Bot Not Responding
If the bot doesn't respond:
- Verify App ID and password are correct
- Check messaging endpoint is accessible
- Ensure HTTPS is properly configured
- Check Gateway is running and receiving requests
- Review Azure Bot logs
Authentication Issues
If authentication fails:
- Verify App ID matches Azure Bot resource
- Check App Password is correct
- Ensure bot is registered in Teams
- Check OAuth configuration if using SSO
Group Access Issues
If group features don't work:
- Check
groupPolicyconfiguration - Verify
groupAllowFromincludes correct team IDs - Ensure bot is added to the team/channel
- Check bot permissions in Teams