Connect to Microsoft Teams
Link your deployed infrastructure with Microsoft Teams to enable chat-based infrastructure management.
๐ What You’ll Configure
- Azure Bot webhook endpoint
- Teams channel connection
- Bot app installation
- Initial testing
๐ Integration Steps
1. Configure Webhook in Azure Bot
Get the Webhook URL
From your CloudFormation stack outputs, copy the TeamsWebhookURL:
https://xxx.execute-api.region.amazonaws.com/prod-stackname/api/messages
Update Bot Configuration
- Go to Azure Portal โ๏ธ
- Navigate to your Azure Bot resource
- Go to Configuration under Settings
- Set Messaging endpoint to your webhook URL
- Click Apply to save
/api/messages
2. Install Teams App
Download the Teams app package:
Customize the manifest:
- Extract the zip file
- Edit
manifest.json
- Replace
YOUR_APP_ID
with your Microsoft App ID - Re-zip the files
Install in Teams:
- Open Microsoft Teams
- Go to Apps โ Manage your apps
- Click Upload an app
- Select Upload a custom app
- Choose your zip file
- Click Add to install
N.B.: You can also ask your Teams admin to upload the app for you if you lack permissions on Teams Admin portal โ๏ธ
4. Add Bot to Team or Chat
For Personal Use
- Find Ohlala SmartOps in your apps
- Click Add
- Start chatting directly with the bot
For Team Use
- Go to your team
- Click โฎ (More options) โ Manage team
- Go to Apps tab
- Click Upload a custom app
- Select your app
- Click Add to team
๐งช Test the Connection
Send Test Message
In Teams, message the bot:
@Ohlala SmartOps hello
Expected response:
๐ Hello! I'm Ohlala SmartOps, your AI-powered AWS infrastructure assistant.
Type '/help' to see what I can do for you.
Test Basic Command
Try a simple command:
@Ohlala SmartOps /help
The bot should respond with a help card showing available commands.
๐ Verify Integration
Check Connection Status
In Azure Portal
- Go to your bot โ Channels
- Microsoft Teams should show Running
- Click Microsoft Teams to see activity
In AWS Console
- Go to CloudWatch โ Log Groups
- Find
/aws/ecs/ohlala-smartops-...
- Check for incoming request logs
Monitor API Gateway
- Go to API Gateway Console
- Select your API
- Go to Dashboard
- You should see incoming requests when messaging the bot
โ Troubleshooting
Bot Not Responding
Check Webhook URL
- Verify URL in Azure Bot Configuration matches CloudFormation output exactly
- Ensure it includes the full path with
/api/messages
Check ECS Service
- Go to ECS Console
- Verify service has 1 running task
- Check task logs for errors
Test Health Endpoint
curl https://your-api.execute-api.region.amazonaws.com/prod-stackname/health
“Service Unavailable” Error
Causes:
- ECS task not running
- API Gateway misconfigured
- Authentication failing
Solution:
- Check ECS service is running
- Verify API Gateway deployment
- Check CloudWatch logs for details
Authentication Errors
Symptoms: 401 or 403 errors in logs
Solution:
- Verify Microsoft App credentials in Secrets Manager
- Ensure Tenant ID is correct
- Check Lambda authorizer logs
Teams App Installation Issues
“App not found”:
- Ensure manifest.json has correct App ID
- Verify bot is published in Azure
“Permissions required”:
- Contact Teams admin to allow custom apps
- Check organizational app policies
๐ Success Checklist
Confirm everything is working:
- Azure Bot shows Teams channel as Running
- Webhook URL configured correctly
- Teams app installed successfully
- Bot responds to messages
- Help command works
- No errors in CloudWatch logs
โญ๏ธ Next Step
Your bot is connected! Now let’s verify everything and run your first commands: