Channels

Microsoft Teams

The Microsoft Teams channel integrates Open Astra agents into your Teams workspace. Agents respond to direct messages and @mentions using the Bot Framework, wired through an Azure App Registration and Bot Service.

Setup

  1. Go to the Azure Portal and create an App Registration. Copy the Application (client) ID — this is your TEAMS_APP_ID.
  2. Under Certificates & secrets, generate a new client secret — this is your TEAMS_APP_PASSWORD.
  3. Create a Bot Service in Azure and link it to your App Registration.
  4. Set the messaging endpoint to your Astra gateway: https://your-domain/channels/teams
  5. In the Teams Developer Portal, create an app, add your bot, and sideload or publish it to your workspace.
  6. Add to your environment:
bash
TEAMS_APP_ID=your-azure-app-id
TEAMS_APP_PASSWORD=your-client-secret

Configuration in astra.yml

yaml
channels:
  teams:
    enabled: true
    appId: your-azure-app-id        # Overrides TEAMS_APP_ID env var
    appPassword: your-client-secret # Overrides TEAMS_APP_PASSWORD env var
Setting enabled: false in astra.yml disables the Teams channel even if the env vars are present.

Features

  • Direct messages — agents respond to 1:1 direct messages without needing a mention
  • @mentions — agents respond when mentioned in channels or group chats
  • Adaptive Cards — structured responses use Teams Adaptive Cards for rich formatting
  • Thread replies — responses are sent within the originating conversation thread
  • File context — files shared in the same message are forwarded to the agent as context
  • Auth verification — all incoming requests are verified via the Bot Framework middleware using your app credentials

Environment Variables

VariableRequiredDescription
TEAMS_APP_IDYesAzure App Registration client ID
TEAMS_APP_PASSWORDYesAzure App Registration client secret
Microsoft Teams requires a publicly accessible HTTPS endpoint. In development, use a tunnel like ngrok: ngrok http 3000.