HPD-Agent.Bots.Teams
0.9.1
dotnet add package HPD-Agent.Bots.Teams --version 0.9.1
NuGet\Install-Package HPD-Agent.Bots.Teams -Version 0.9.1
<PackageReference Include="HPD-Agent.Bots.Teams" Version="0.9.1" />
<PackageVersion Include="HPD-Agent.Bots.Teams" Version="0.9.1" />
<PackageReference Include="HPD-Agent.Bots.Teams" />
paket add HPD-Agent.Bots.Teams --version 0.9.1
#r "nuget: HPD-Agent.Bots.Teams, 0.9.1"
#:package HPD-Agent.Bots.Teams@0.9.1
#addin nuget:?package=HPD-Agent.Bots.Teams&version=0.9.1
#tool nuget:?package=HPD-Agent.Bots.Teams&version=0.9.1
HPD Teams Bot
Teams uses the Microsoft 365 Agents SDK for HTTP routing, JWT validation, activity deserialization, and proactive conversation endpoints. HPD owns the bot bridge after the SDK has produced an ITurnContext.
Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.AddTeamsBot(options =>
{
options.AppId = builder.Configuration["Teams:AppId"]!;
options.AppPassword = builder.Configuration["Teams:AppPassword"];
options.AppTenantId = builder.Configuration["Teams:TenantId"];
options.AppType = "SingleTenant";
});
var app = builder.Build();
app.MapTeamsBot();
app.Run();
MapTeamsBot() maps the standard Agents SDK endpoints and the proactive endpoints discovered from [ContinueConversation] handlers on TeamsAgent.
AddTeamsBot() also registers the SDK's M365 attachment downloader. Teams file uploads are downloaded by the Agents SDK and exposed through turn-state input files before HPD message processing runs.
Graph-backed history APIs are opt-in. Register them only when the host already has a configured Microsoft Graph client:
builder.Services.AddTeamsGraphHistory(graphClient);
Configuration Shape
The host app must also provide the Agents SDK auth settings expected by Microsoft.Agents.Hosting.AspNetCore. The exact values depend on tenant/app registration, but the shape mirrors the official M365 Agents samples:
{
"Teams": {
"AppId": "<app-client-id>",
"AppPassword": "<client-secret>",
"TenantId": "<tenant-id>"
},
"TokenValidation": {
"Enabled": true,
"Audiences": ["<app-client-id>"],
"TenantId": "<tenant-id>"
},
"AgentApplication": {
"StartTypingTimer": false,
"RemoveRecipientMention": false,
"NormalizeMentions": false
},
"Connections": {
"ServiceConnection": {
"Settings": {
"AuthType": "ClientSecret",
"AuthorityEndpoint": "https://login.microsoftonline.com/<tenant-id>",
"ClientId": "<app-client-id>",
"ClientSecret": "<client-secret>",
"Scopes": [
"https://api.botframework.com/.default"
]
}
}
},
"ConnectionsMap": [
{
"ServiceUrl": "*",
"Connection": "ServiceConnection"
}
]
}
Inbound turns persist compact Teams routing metadata such as teams.conversationId, teams.serviceUrl, teams.tenantId, and teams.channelContext. Live proactive DM and Graph history behavior still need validation against a real Microsoft 365 tenant.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- HPD-Agent.Bots.Abstractions (>= 0.9.1)
- HPD-Agent.Bots.AspNetCore (>= 0.9.1)
- HPD-Agent.Hosting (>= 0.9.1)
- Microsoft.Agents.Authentication.Msal (>= 1.9.205)
- Microsoft.Agents.Hosting.AspNetCore (>= 1.9.205)
- Microsoft.Graph (>= 6.8.0)
-
net8.0
- HPD-Agent.Bots.Abstractions (>= 0.9.1)
- HPD-Agent.Bots.AspNetCore (>= 0.9.1)
- HPD-Agent.Hosting (>= 0.9.1)
- Microsoft.Agents.Authentication.Msal (>= 1.9.205)
- Microsoft.Agents.Hosting.AspNetCore (>= 1.9.205)
- Microsoft.Graph (>= 6.8.0)
-
net9.0
- HPD-Agent.Bots.Abstractions (>= 0.9.1)
- HPD-Agent.Bots.AspNetCore (>= 0.9.1)
- HPD-Agent.Hosting (>= 0.9.1)
- Microsoft.Agents.Authentication.Msal (>= 1.9.205)
- Microsoft.Agents.Hosting.AspNetCore (>= 1.9.205)
- Microsoft.Graph (>= 6.8.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.