You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The core SDK for building Microsoft Teams bots in .NET. It implements the Activity Protocol and provides a modern, layered framework with first-class support for ASP.NET Core dependency injection, authentication via MSAL, and extensible activity schemas.
Compatibility bridge for existing Bot Framework SDK v4 bots to run on the new Core infrastructure
Quick Start
usingMicrosoft.Teams.Apps;varbuilder=WebApplication.CreateBuilder(args);builder.Services.AddTeamsBotApplication();varapp=builder.Build();varteams=app.UseTeamsBotApplication();// maps POST /api/messagesteams.OnMessage(async(context,ct)=>{awaitcontext.SendAsync($"You said: {context.Activity.Text}");});app.Run();
Design Principles
Loose schema — CoreActivity contains only strictly required fields; additional fields are captured via JsonExtensionData
Simple serialization — Standard System.Text.Json with source generation, no custom converters
Extensible schema — ChannelData and entities support extension properties; generics allow custom types
MSAL-based auth — Token acquisition built on Microsoft Identity Web, supporting client secrets, managed identities, and agentic (user-delegated) tokens
ASP.NET DI — All dependencies configured via IServiceCollection, reusing the built-in HttpClient factory
ILogger & IConfiguration — Standard .NET logging and configuration throughout
Configuration
Create a Teams Application, configure it in Azure Bot Service, and provide credentials via appsettings.json: