Skip to main content

Microsoft Teams

Deploy bots to Microsoft Teams meetings.

Overview

MeetBot uses Puppeteer to join Teams meetings via the web client. The bot:

  1. Opens a Chromium browser
  2. Joins via Teams web client
  3. Captures screen and audio
  4. Records the meeting

Teams meeting links contain encoded information:

https://teams.microsoft.com/l/meetup-join/19%3ameeting_xxx@thread.v2/...?context=...

The URL contains:

  • Meeting ID: Encoded in the path
  • Tenant ID: Organization identifier
  • Organizer ID: Meeting creator's ID

Creating a Teams Bot

Using Parsed Information

curl -X POST http://localhost:8000/api/v1/bots \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"meetingInfo": {
"platform": "teams",
"meetingId": "meeting-id-here",
"tenantId": "tenant-id-here",
"organizerId": "organizer-id-here"
},
"botDisplayName": "RecordBot",
"meetingTitle": "Project Review"
}'

Using Full URL

The API automatically parses Teams URLs:

{
"meetingInfo": {
"platform": "teams",
"meetingUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_xxx..."
}
}

Extracting Meeting Details

Teams URLs encode meeting details. Here's how they're parsed:

// URL structure
// /l/meetup-join/19%3ameeting_ID@thread.v2/...?context={"Tid":"...","Oid":"..."}

// Meeting ID: after "19%3ameeting_" and before "@"
// Tenant ID: context.Tid
// Organizer ID: context.Oid

Bot Behavior

Joining

  1. Navigate to Teams web client
  2. Choose "Continue on this browser"
  3. Enter display name
  4. Join with audio/video disabled

Lobby

If meeting has lobby enabled:

  • Bot waits in lobby
  • Organizer must admit
  • Times out after waitingRoomTimeout

Recording

  • Captures video and screen shares
  • Records all participant audio
  • Saves to WebM format

Leaving

Bot leaves when:

  • Meeting ends
  • All participants leave (after timeout)
  • Manually killed via API

Teams-Specific Requirements

Meeting Settings

For bot to join, the meeting should:

  1. Allow anonymous users (if bot isn't a Teams user):

    • Meeting Options > Who can bypass the lobby > Everyone
  2. Allow web client access:

    • Default in most tenants

Organization Policies

Your Teams admin may need to:

  • Allow external participants
  • Allow anonymous meeting join
  • Disable lobby for specific meeting types

Limitations

  • Web Client: Uses browser-based Teams
  • Authentication: Cannot join as authenticated Teams user
  • Chat: Cannot access meeting chat
  • Breakout Rooms: Not supported
  • Live Captions: Cannot access Teams captions

Troubleshooting

"Unable to Join Meeting"

  • Check meeting allows anonymous participants
  • Verify meeting hasn't ended
  • Ensure lobby is disabled or host admits bot

Bot Stuck in Lobby

  • Host must admit the bot
  • Or change meeting settings to bypass lobby

"Meeting Expired"

  • Teams meeting links can expire
  • Generate a new meeting link

Authentication Required

  • Meeting may require Teams authentication
  • Change meeting settings to allow anonymous access

Best Practices

  1. Configure meeting options: Allow anonymous users
  2. Disable lobby: Or ensure host is ready to admit
  3. Use organization accounts: If possible, for better access
  4. Test with your tenant: Different orgs have different settings