
Chat SDK now supports reactions and ephemeral messages on Teams
Quick Answer
The Chat SDK for Microsoft Teams now supports reactions and ephemeral messages, allowing bots to interact more dynamically.
Quick Take
Bots can add/remove reactions and send targeted messages visible only to specific users, enhancing user engagement and privacy.
Key Points
- Bots can now add and remove reactions on Teams messages.
- Ephemeral messages are sent using thread.postEphemeral() and channel.postEphemeral().
- Incoming messages include authors' Microsoft Graph emails for better identification.
- Custom token factory allows bots to authenticate without static client secrets.
- Group conversations are now correctly identified, improving routing accuracy.
📖 Reader Mode
~2 min readChat SDK's Microsoft Teams adapter now supports reactions and ephemeral messages through the same API as other adapters.
Bots can add and remove reactions on Teams messages, and call thread.postEphemeral() or channel.postEphemeral() to send native, targeted messages that only the intended user sees, like permission prompts.
lib/bot.ts
import { Chat, emoji } from "chat";
import { createTeamsAdapter } from "@chat-adapter/teams";
const bot = new Chat({
userName: "mybot",
adapters: {
teams: createTeamsAdapter(),
},
});
bot.onSubscribedMessage(async (thread, message) => {
// Acknowledge with a reaction, then clear it when done
const sent = await thread.post("Working on it...");
await sent.addReaction(emoji.check);
await sent.removeReaction(emoji.check);
// Reply so only the message author sees it
await thread.postEphemeral(message.author, "Only you can see this", {
fallbackToDM: true,
});
});
This release also adds:
Author emails: Incoming Teams messages include the author's Microsoft Graph email, with their user principal name as a fallback.
Custom token factory: Pass a token function in
TeamsAdapterConfigto supply your own access tokens, so bots on runtimes without Azure IMDS can authenticate without a static client secret.Native DM status: Progress messages now show as a native Teams status in direct messages.
Conversation routing: Group conversations are no longer misidentified as direct messages, so they're always handled correctly.
Mention conversion: Email addresses,
@handlesinside URLs, and mentions inside code spans are no longer turned into Teams mentions.
Read the Teams adapter documentation to get started, or learn more about ephemeral messages and reactions.
Special thanks to onmax for their contributions to this release.
— Originally published at vercel.com
Want this in your inbox every morning?
Daily brief at your local 8am — bilingual EN/中文, free.
More from Vercel AI
See more →
The Agent Stack
The Agent Stack by Vercel AI provides essential building blocks for creating production-grade agents, enabling seamless integration across multiple AI models and secure operations. It features components like AI Gateway for model routing, Workflow SDK for durable execution, and Vercel Connect for scoped access, streamlining agent development and deployment across various platforms.

