m365-agents-dotnet
Skill by lingxling
Guides developers in building Microsoft 365 agents in .NET with ASP.NET Core hosting, AgentApplication routing and MSAL-based auth. It targets agents for Teams, Microsoft 365 and Copilot Studio.
Install m365-agents-dotnet
Built from the published package, never by AI.
git clone --depth 1 https://github.com/lingxling/awesome-skills-cn /tmp/awesome-skills-cn && mkdir -p ~/.claude/skills && cp -r /tmp/awesome-skills-cn/antigravity-awesome-skills/skills/m365-agents-dotnet ~/.claude/skills/m365-agents-dotnetRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/lingxling/awesome-skills-cn /tmp/awesome-skills-cn && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/awesome-skills-cn/antigravity-awesome-skills/skills/m365-agents-dotnet ~/.gemini/antigravity-cli/skills/m365-agents-dotnetAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The m365-agents-dotnet skill gives an assistant guidance for building multichannel agents with the Microsoft.Agents SDK for .NET. It covers installing the Microsoft.Agents packages, configuring appsettings.json for token validation and connections, and hosting an agent in ASP.NET Core with a /api/messages endpoint. It also shows AgentApplication subclasses that handle welcome messages, incoming messages and turn errors.
The skill includes a Copilot Studio direct-to-engine client example that acquires tokens with MSAL, using silent acquisition with an interactive fallback. It lists best practices such as using MemoryStorage only for development and requiring authorization on /api/messages. It is aimed at .NET developers building agents for Microsoft 365, Teams and Copilot Studio.
Written from the project's SKILL.md and checked against it.
What it can do
- ASP.NET Core agent hostShows how to host an agent with AddAgent, AddAgentAspNetAuthentication and an /api/messages endpoint.
- AgentApplication routingShows an AgentApplication subclass that routes members added, messages and turn errors.
- Appsettings configurationProvides a sample appsettings.json for token validation, service connections and Copilot Studio settings.
- MSAL token acquisitionShows a DelegatingHandler that gets tokens silently and falls back to interactive sign-in.
- Copilot Studio clientShows a console host that starts a conversation and asks questions with CopilotClient.
- Best practicesLists guidance on storage, token validation, secrets, HttpClient reuse and async handlers.
What you need
- .NET with the dotnet CLI
- NuGet access to the Microsoft.Agents packages
- Client ID, tenant ID and client secret values for the connection settings
- Copilot Studio environment settings for the Copilot Studio client sample
Try asking
- Set up an ASP.NET Core host for a Teams agent with /api/messages
- Write an AgentApplication subclass that handles welcome and message routing
- Show me how to call a Copilot Studio agent from a .NET console app
Good to know
- MemoryStorage is for development only, according to the source
- The skill says to verify current APIs and NuGet package versions before implementation
- The Copilot Studio sample uses an interactive sign-in flow when silent token acquisition fails
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: antigravity-awesome-skills/skills/m365-agents-dotnet/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to m365-agents-dotnet
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
m365-agents-dotnet: common questions
Which platforms does this agent SDK target?
The source says it builds agents for Microsoft 365, Teams and Copilot Studio. It uses the Microsoft.Agents SDK with ASP.NET Core hosting.
Can I use in-memory storage in production?
No. The best practices section says to use MemoryStorage only for development and persisted storage in production.
How does the Copilot Studio client get a token?
The sample uses MSAL to acquire a token silently and falls back to an interactive request when a UI prompt is required.
How do I install m365-agents-dotnet?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is m365-agents-dotnet free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is m365-agents-dotnet safe to use?
It scores 72 of 100. Grades: maintenance B, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to m365-agents-dotnet?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
