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
- Go to the Azure Portal and create an App Registration. Copy the Application (client) ID — this is your
TEAMS_APP_ID. - Under Certificates & secrets, generate a new client secret — this is your
TEAMS_APP_PASSWORD. - Create a Bot Service in Azure and link it to your App Registration.
- Set the messaging endpoint to your Astra gateway:
https://your-domain/channels/teams - In the Teams Developer Portal, create an app, add your bot, and sideload or publish it to your workspace.
- Add to your environment:
bash
TEAMS_APP_ID=your-azure-app-id
TEAMS_APP_PASSWORD=your-client-secretConfiguration 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
| Variable | Required | Description |
|---|---|---|
TEAMS_APP_ID | Yes | Azure App Registration client ID |
TEAMS_APP_PASSWORD | Yes | Azure App Registration client secret |
ℹMicrosoft Teams requires a publicly accessible HTTPS endpoint. In development, use a tunnel like ngrok:
ngrok http 3000.