Vercel Connect now supports Microsoft Teams
Vercel Connect now includes a managed connector for Microsoft Teams. Creating one gives your organization a Teams bot that your apps and agents run. People can @mention it in channels or message it directly, and your code receives the message and replies as the bot.
As a Vercel Managed Connector, Vercel registers the Entra app and Azure Bot resource in your tenant, so there's no client secret to store. A tenant administrator with an Azure subscription completes setup once. Incoming Teams activities are verified and forwarded to your project as Connect trigger.
Create a connector from the dashboard or Vercel CLI:
vc connect create microsoft-teams --name acme-teams --triggers
Create a Teams connector with triggers enabled
Once the connector is set up, your code requests a token only when it needs one. Use it with the @vercel/connect SDK, eve channel or Chat SDK adapter:
exportasyncfunctionPOST(request: Request){
from: activity.recipient,
const token =awaitgetToken('microsoft-teams/acme-teams',{
method:'POST',
});
body:JSON.stringify({
{
text:'Hello friend.',
scopes:['https://api.botframework.com/.default'],
type:'message',
awaitfetch(
headers:{
replyToId: activity.id,
recipient: activity.from,
returnnewResponse(null,{ status:200});