Microsoft 365 Agents SDK (Python)
Build Microsoft 365 AI Agents with Python
Organizations need AI agents that integrate seamlessly with Microsoft 365. This skill provides production-ready patterns for building Teams bots and Copilot Studio agents using the official Microsoft Agents SDK.
Télécharger le ZIP du skill
Importer dans Claude
Allez dans Paramètres → Capacités → Skills → Importer un skill
Activez et commencez Ă utiliser
Tester
Utilisation de "Microsoft 365 Agents SDK (Python)". Set up a basic Teams bot that echoes user messages
Résultat attendu:
- Agent application initialized with aiohttp CloudAdapter
- Message handler registered for activity type: message
- Conversation update handler registered for: membersAdded
- Server running on localhost:3978 with JWT authorization middleware
Utilisation de "Microsoft 365 Agents SDK (Python)". Add OAuth authentication for Microsoft Graph access
Résultat attendu:
- MsalConnectionManager configured with Azure AD settings
- Auth handler 'GRAPH' registered for protected routes
- Token acquisition flow ready for interactive or silent auth
- Protected endpoint /me returns user profile with Bearer token
Audit de sécurité
SûrThis is a prompt-only instructional skill that provides code examples for building Microsoft 365 agents. Static analysis detected no security issues. The skill contains legitimate SDK usage patterns for aiohttp hosting, MSAL authentication, and Copilot Studio integration. Environment variable usage follows security best practices.
Facteurs de risque
🔑 Variables d’environnement (1)
Score de qualité
Ce que vous pouvez construire
Enterprise Teams Bot Development
Build internal company bots for Teams that handle HR queries, IT support tickets, or onboarding workflows with Graph API integration.
Copilot Studio Agent Integration
Create custom AI agents that connect to Copilot Studio engines for specialized domain knowledge and enterprise data access.
Multi-Channel Agent Deployment
Deploy a single agent application that serves multiple channels including Teams, web chat, and custom clients through standardized routing.
Essayez ces prompts
Create a Microsoft 365 agent with aiohttp hosting that responds to 'hello' and 'help' messages. Include basic conversation update handlers and error handling.
Add an auth-protected route that retrieves the user's Microsoft Graph profile and displays their name. Use MSAL connection manager for token acquisition.
Implement a streaming response handler that uses Azure OpenAI to generate creative content. Include sensitivity labels and feedback loop configuration.
Create a standalone script that connects to Copilot Studio using the client SDK. Include token acquisition and conversation management.
Bonnes pratiques
- Always use MemoryStorage only for development. Switch to BlobStorage or CosmosDB for production deployments to ensure data persistence.
- Keep all secrets in environment variables using dotenv. Never commit credentials to source control.
- Call end_stream() in finally blocks when implementing streaming responses to ensure proper connection cleanup.
Éviter
- Do not use the old microsoft.agents import syntax. Always use microsoft_agents with underscores for current SDK versions.
- Avoid hardcoding client IDs, secrets, or tenant IDs directly in source code. Use environment variables exclusively.
- Do not skip JWT authorization middleware in production. Always include jwt_authorization_middleware in aiohttp Application configuration.