Agent skill · software engineering · sickn33
m365-agents-dotnet
Microsoft 365 Agents SDK for .NET. Build multichannel agents for Teams/M365/Copilot Studio with ASP.NET Core hosting, AgentApplication routing, and MSAL-based auth.
Why this skill is useful
Provides specific implementation patterns and configuration for building Microsoft 365 agents that the AI wouldn't reliably generate on its own.
What it needs
Requires dotnet installed locally. Requires microsoft account access. About 4k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.
What this skill does
Supporting material availability This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files: <support-root>/references/acceptance-criteria.md Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable. Microsoft 365 Agents SDK (.NET) Overview Build enterprise agents for Microsoft 365, Teams, and Copilot Studio using the Microsoft.Agents SDK with ASP.NET Core hosting, agent routing, and MSAL-based authentication. Before implementation Use the microsoft-docs MCP to verify the latest APIs for AddAgent, AgentApplication, and authentication options. Confirm package versions in NuGet for the Microsoft.Agents. packages you plan to use. Installation Configuration (appsettings.json) Core Workflow: ASP.NET Core agent host AgentApplication routing Copilot Studio direct-to-engine client DelegatingHandler for token acquisition (interactive flow) Console host with CopilotClient Best Practices 1. Use AgentApplication subclasses to centralize routing and error handling. 2. Use MemoryStorage only for development; use persisted storage in production. 3. Enable TokenValidation in production and require authorization on /api/messages. 4. Keep auth secrets in configuration providers (Key Vault, managed identity, env vars). 5. Reuse HttpClient from IHttpClientFactory and cache MSAL tokens. 6. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sickn33/m365-agents-dotnet--664113