Connect to Microsoft Teams

Configure the webhook and install the bot in Microsoft Teams

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

  1. Go to Azure Portal ↗️
  2. Navigate to your Azure Bot resource
  3. Go to Configuration under Settings
  4. Set Messaging endpoint to your webhook URL
  5. Click Apply to save

Azure Bot Configuration page with Messaging endpoint field highlighted

2. Install Teams App

  1. Download the Teams app package:

    Ohlala SmartOps Teams App ↗️

  2. Customize the manifest:

    • Extract the zip file
    • Edit manifest.json
    • Replace YOUR_APP_ID with your Microsoft App ID
    • Re-zip the files
  3. 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

  1. Find Ohlala SmartOps in your apps
  2. Click Add
  3. Start chatting directly with the bot

For Team Use

  1. Go to your team
  2. Click (More options) → Manage team
  3. Go to Apps tab
  4. Click Upload a custom app
  5. Select your app
  6. 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

Teams chat showing bot responding to /help command with list of available commands

The bot should respond with a help card showing available commands.

🔍 Verify Integration

Check Connection Status

In Azure Portal

  1. Go to your bot → Channels
  2. Microsoft Teams should show Running
  3. Click Microsoft Teams to see activity

In AWS Console

  1. Go to CloudWatch → Log Groups
  2. Find /aws/ecs/ohlala-smartops-...
  3. Check for incoming request logs

Monitor API Gateway

  1. Go to API Gateway Console
  2. Select your API
  3. Go to Dashboard
  4. 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:

  1. Check ECS service is running
  2. Verify API Gateway deployment
  3. Check CloudWatch logs for details

Authentication Errors

Symptoms: 401 or 403 errors in logs

Solution:

  1. Verify Microsoft App credentials in Secrets Manager
  2. Ensure Tenant ID is correct
  3. 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:

Continue to Verification & Testing →