Microsoft Teams Integration
Technical design for PraisonAI Microsoft Teams channel implementation
Run PraisonAI agents in Microsoft Teams channels via BotOS — enterprise collaboration with the same agent brain as Telegram and Discord.
import os
from praisonaiagents import Agent
from praisonai.bots import Bot
agent = Agent(
name="Teams Assistant",
instructions="Help users in Microsoft Teams channels.",
)
bot = Bot(
"teams",
agent=agent,
app_id=os.getenv("TEAMS_APP_ID"),
app_password=os.getenv("TEAMS_APP_PASSWORD"),
)
bot.run()The user messages in Microsoft Teams; BotOS routes the conversation to the same agent used on other channels.
How It Works
Quick Start
- Simple Usage
python import os from praisonaiagents import Agent from praisonai.bots import Bot agent = Agent( name="Teams Assistant", instructions="Help users in Microsoft Teams channels.", ) bot = Bot( "teams", agent=agent, app_id=os.getenv("TEAMS_APP_ID"), app_password=os.getenv("TEAMS_APP_PASSWORD"), ) bot.run() - With Configuration
Add Teams to a multi-platform BotOS setup:
python import os from praisonaiagents import Agent from praisonai.bots import BotOS agent = Agent(name="Assistant", instructions="Be helpful.") botos = BotOS( agent=agent, platforms={ "teams": { "app_id": os.getenv("TEAMS_APP_ID"), "app_password": os.getenv("TEAMS_APP_PASSWORD"), "tenant_id": os.getenv("AZURE_TENANT_ID"), }, }, ) botos.run()
Overview
This RFC proposes Microsoft Teams as a first-class PraisonAI messaging channel for enterprise RFPs and Microsoft 365-first organisations.
Success Criteria
- Full BotOS protocol compatibility
- Multi-agent deployment in Teams channels
- Enterprise security and compliance features
- Rich message formatting and adaptive cards
- SSO and Azure AD integration
Architecture
Configuration
# teams-bot.yaml
platform: teams
app_id: ${TEAMS_APP_ID}
app_password: ${TEAMS_APP_PASSWORD}
tenant_id: ${AZURE_TENANT_ID}
agent:
name: TeamsAssistant
instructions: You are a helpful assistant in Microsoft Teams
features:
adaptive_cards: true
file_uploads: true
threading: true
security:
sso_enabled: true
audit_logging: trueImplementation Plan
| Phase | Duration | Scope |
|---|---|---|
| 1 — Core Messaging | 4 weeks | Bot Framework SDK, send/receive, BotOS protocol |
| 2 — Advanced Features | 3 weeks | Adaptive cards, Azure AD, audit logging |
| 3 — Production | 2 weeks | Test suite, security audit, documentation |
Security
| Layer | Implementation |
|---|---|
| Authentication | Azure AD OAuth 2.0 |
| Encryption | TLS 1.3 + Azure Key Vault |
| Audit trail | Azure Monitor + PraisonAI logs |
| Rate limiting | Azure API Management |
Best Practices
Use Azure Key Vault for credentials
Store TEAMS_APP_ID and TEAMS_APP_PASSWORD in Key Vault — never commit secrets to source control.
Deploy AgentTeam across channels
Use AgentTeam for multi-agent Teams channels with session management per conversation.
Enable SSO for enterprise tenants
Configure Azure AD SSO so users authenticate with existing Microsoft 365 credentials.
Use adaptive cards for approvals
Human-in-the-loop workflows map cleanly to Teams adaptive card submit actions.