Files
vercel__chat/packages/adapter-teams
github-actions[bot] 3c4e07973c Version Packages (#5)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-03 14:01:53 -08:00
..
2026-01-03 13:33:59 -08:00
2026-01-03 14:01:53 -08:00
2026-01-03 14:01:53 -08:00
2026-01-02 14:20:41 -08:00
2025-12-31 13:14:26 -08:00
2025-12-21 20:48:14 -08:00
2025-12-21 20:48:14 -08:00
2025-12-21 20:48:14 -08:00

@chat-adapter/teams

Microsoft Teams adapter for the chat SDK.

Installation

npm install chat @chat-adapter/teams

Usage

import { Chat } from "chat";
import { createTeamsAdapter } from "@chat-adapter/teams";

const chat = new Chat({
  userName: "mybot",
  adapters: {
    teams: createTeamsAdapter({
      appId: process.env.TEAMS_APP_ID!,
      appPassword: process.env.TEAMS_APP_PASSWORD!,
    }),
  },
});

// Handle @mentions
chat.onNewMention(async (thread, message) => {
  await thread.post("Hello from Teams!");
});

Configuration

Option Required Description
appId Yes Azure Bot App ID
appPassword Yes Azure Bot App Password
tenantId No Azure AD Tenant ID (for single-tenant apps)

Setup

1. Create Azure Bot

  1. Go to Azure Portal
  2. Create a new Azure Bot resource
  3. Note the App ID and create an App Password

2. Configure Bot Messaging Endpoint

Set the messaging endpoint to your webhook URL:

https://your-domain.com/api/webhooks/teams

3. Create Teams App

  1. Go to Teams Developer Portal
  2. Create a new app
  3. Configure bot with your Azure Bot App ID
  4. Install the app to your Teams workspace

Features

  • Message posting and editing
  • Thread subscriptions
  • Reaction events (receive only)
  • File attachments
  • Rich cards (Adaptive Cards)
  • Action callbacks (card actions)
  • Typing indicators
  • Direct messages
  • Proactive messaging

Limitations

  • Adding reactions: Teams Bot Framework doesn't support bots adding reactions
  • Message history: No API to fetch message history

License

MIT