packages/docs/plugin-registry/platform/msteams.md
The Microsoft Teams plugin connects Eliza agents to Teams as an Azure Bot, supporting channel messages, DMs, threaded replies, and media uploads via OneDrive/SharePoint.
Package: @elizaos/plugin-msteams
eliza plugins install @elizaos/plugin-msteams
Set the messaging endpoint to your Eliza server URL:
https://your-eliza-host/api/msteams/webhook
{
"connectors": {
"msteams": {
"enabled": true,
"appId": "YOUR_APP_ID",
"appPassword": "YOUR_APP_PASSWORD",
"tenantId": "YOUR_TENANT_ID",
"dmPolicy": "pairing"
}
}
}
Or via environment variables:
export MSTEAMS_APP_ID=YOUR_APP_ID
export MSTEAMS_APP_PASSWORD=YOUR_APP_PASSWORD
export MSTEAMS_TENANT_ID=YOUR_TENANT_ID
| Field | Required | Description |
|---|---|---|
appId | Yes | Azure Bot App ID |
appPassword | Yes | Azure Bot App Password (client secret) |
tenantId | Yes | Azure AD Tenant ID |
replyStyle | No | thread or top-level (default: thread) |
webhookPort | No | Port for incoming webhooks |
webhookPath | No | Path for webhook endpoint |
mediaHostAllowlist | No | Allowed hosts for media downloads |
mediaAuthHosts | No | Hosts requiring auth for media downloads |
sharepointSiteId | No | SharePoint site ID for file uploads in group chats |
dmPolicy | No | DM handling policy |
allowFrom | No | Array of allowed user IDs (for open DM policy) |
| Variable | Required | Description |
|---|---|---|
MSTEAMS_APP_ID | No | Azure Bot App ID |
MSTEAMS_ENABLED | No | Enable or disable the connector |
MSTEAMS_TENANT_ID | No | Azure AD Tenant ID |
MSTEAMS_APP_PASSWORD | Yes | Azure Bot App Password (client secret) |
MSTEAMS_MEDIA_MAX_MB | No | Maximum media upload size in MB |
MSTEAMS_WEBHOOK_PATH | No | Webhook endpoint path |
MSTEAMS_WEBHOOK_PORT | No | Webhook listener port |
MSTEAMS_ALLOWED_TENANTS | No | Comma-separated allowed tenant IDs |
MSTEAMS_SHAREPOINT_SITE_ID | No | SharePoint site ID for file uploads |
The plugin auto-enables when the connectors.msteams block contains botToken, token, or apiKey. Note that appId and appPassword alone do not trigger auto-enable -- set botToken to the app password to trigger auto-enable, or add the plugin to plugins.allow explicitly.
Verify the messaging endpoint URL is publicly accessible and points to your Eliza server's webhook path.
Ensure the App Password has not expired. Azure Bot client secrets have configurable expiry periods.