Microsoft Teams
Overview
Section titled “Overview”The Microsoft Teams provider integrates your digital worker with Teams channels and chats. It supports:
- Channel messages
- Personal chats
- Group chats
- Adaptive Cards
- Interactive components
- File attachments
Prerequisites
Section titled “Prerequisites”- Microsoft 365 tenant
- Admin access to Azure AD
-
Create Azure Bot Registration
Go to Azure Portal:
- Search for “Bot Services”
- Click “Create”
- Fill in details:
- Bot handle: your-bot-name
- Subscription: your subscription
- Resource group: create or select
- Pricing: F0 (free) or S1
- Click “Create”
-
Configure Bot Endpoint
In your Bot Service:
- Go to Configuration
- Set Messaging endpoint:
https://your-domain.com/webhook/teams/{tenant}/{team}
-
Get App Credentials
In Configuration:
- Copy Microsoft App ID
- Click “Manage” next to Microsoft App ID
- Create a new Client Secret
- Copy the secret value (shown only once!)
-
Enable Teams Channel
In your Bot Service:
- Go to Channels
- Click Microsoft Teams
- Accept terms and enable
-
Create Teams App Package
Create a manifest for your Teams app:
manifest.json {"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json","manifestVersion": "1.16","version": "1.0.0","id": "{{BOT_ID}}","packageName": "com.yourcompany.supportbot","developer": {"name": "Your Company","websiteUrl": "https://yourcompany.com","privacyUrl": "https://yourcompany.com/privacy","termsOfUseUrl": "https://yourcompany.com/terms"},"name": {"short": "Support Bot","full": "Support Bot for Customer Service"},"description": {"short": "Customer support assistant","full": "AI-powered customer support assistant"},"icons": {"outline": "outline.png","color": "color.png"},"accentColor": "#0078D4","bots": [{"botId": "{{BOT_ID}}","scopes": ["personal", "team", "groupchat"],"supportsFiles": true,"isNotificationOnly": false}],"permissions": ["identity", "messageTeamMembers"],"validDomains": ["your-domain.com"]} -
Configure Provider
answers.json {"messaging-teams": {"enabled": true,"public_base_url": "https://your-domain.ngrok-free.app","app_id": "your-microsoft-app-id","app_password": "your-client-secret","tenant_id": "your-azure-tenant-id"}} -
Run Setup
Terminal window gtc setup --answers answers.json ./my-bundle -
Install App in Teams
- Zip manifest.json with icons
- Go to Teams Admin Center or upload directly
- Install to your team or users
Configuration Options
Section titled “Configuration Options”| Option | Required | Description |
|---|---|---|
enabled | Yes | Enable/disable provider |
public_base_url | Yes | Public URL for webhook |
app_id | Yes | Microsoft App ID |
app_password | Yes | Client Secret |
tenant_id | No | Azure AD Tenant ID (for single-tenant apps) |
Features
Section titled “Features”Text Messages
Section titled “Text Messages”- id: reply type: reply config: message: "Hello! How can I help you today?"Markdown Formatting
Section titled “Markdown Formatting”Teams supports a subset of Markdown:
- id: formatted type: reply config: message: | **Bold** *Italic* - Bullet 1 - Bullet 2 [Link](https://example.com)Adaptive Cards
Section titled “Adaptive Cards”Teams has excellent Adaptive Card support:
- id: send_card type: adaptive-card config: card: type: AdaptiveCard version: "1.4" body: - type: TextBlock text: "Welcome!" size: Large weight: Bolder - type: TextBlock text: "How can I assist you today?" - type: ActionSet actions: - type: Action.Submit title: "Get Help" data: action: "help" - type: Action.Submit title: "Create Ticket" data: action: "ticket"Hero Cards
Section titled “Hero Cards”- id: hero_card type: reply config: hero_card: title: "Support Bot" subtitle: "Your AI Assistant" text: "I can help with technical issues, billing questions, and more." images: - url: "https://example.com/bot-image.png" buttons: - type: messageBack title: "Get Started" text: "get started" displayText: "Getting started..."Suggestions (Quick Replies)
Section titled “Suggestions (Quick Replies)”- id: suggestions type: reply config: message: "What would you like to do?" suggested_actions: - title: "Check Status" value: "status" - title: "Create Ticket" value: "ticket" - title: "Contact Human" value: "human"File Attachments
Section titled “File Attachments”- id: send_file type: reply config: message: "Here's your report" attachments: - contentType: "application/pdf" contentUrl: "https://example.com/report.pdf" name: "report.pdf"Handling Card Actions
Section titled “Handling Card Actions”name: handle_card_actionversion: "1.0"
nodes: - id: route_action type: branch config: conditions: - expression: "data.action == 'help'" next: show_help - expression: "data.action == 'ticket'" next: create_ticket default: unknown_action
- id: show_help type: reply config: message: "Here's how I can help..."
triggers: - type: invoke name: "adaptiveCard/action" target: route_actionChannel Configuration
Section titled “Channel Configuration”Team Channel
Section titled “Team Channel”tenants: demo: teams: support: channels: teams: provider: messaging-teams config: team_id: "19:xxx@thread.tacv2" channel_id: "19:yyy@thread.tacv2"Personal Chat
Section titled “Personal Chat”For personal 1:1 chats, no channel configuration needed. The bot responds to whoever messages it.
Proactive Messaging
Section titled “Proactive Messaging”Send messages without user initiation:
- id: proactive type: reply config: message: "Reminder: Your ticket #123 needs attention" conversation_reference: conversation_id: "{{stored_conversation_id}}" service_url: "{{stored_service_url}}"Troubleshooting
Section titled “Troubleshooting”Bot Not Responding
Section titled “Bot Not Responding”- Check endpoint configuration in Azure Bot Service
- Verify SSL certificate is valid
- Check app credentials are correct
- Review activity logs in Azure
”Unauthorized” Error
Section titled “”Unauthorized” Error”- Verify App ID and Password
- Check tenant ID for single-tenant apps
- Ensure bot is enabled in Teams channel
Card Not Rendering
Section titled “Card Not Rendering”- Validate card JSON with Adaptive Cards Designer
- Check Teams supports the card version
- Verify all required fields are present
Messages Delayed
Section titled “Messages Delayed”- Teams can batch messages; this is normal
- Check your server performance
- Verify no rate limiting
Security
Section titled “Security”Greentic automatically validates:
- JWT signature
- Issuer and audience claims
- Token expiration
Next Steps
Section titled “Next Steps”- Adaptive Cards Designer - Design cards visually
- Slack Provider - Add Slack integration
- WebChat Provider - Embed in websites