AI Agent Integration with Microsoft Teams
Agents can call teams as a subprocess and receive stable JSON envelopes. This avoids brittle browser automation and avoids embedding Teams workflows inside a chat bot framework.
Pattern
teams message list --chat "$CHAT_ID" --page-size 20 --output json
teams message send --chat "$CHAT_ID" --body "$RESPONSE" --output json
Auth model
Delegated auth means the agent acts as the signed-in user and inherits that user's Teams access. This is the supported model today. Future unattended posting should use bot mode.
Guardrails
- Store processed message IDs.
- Keep raw chat contents out of logs.
- Deny destructive commands unless explicitly allowed.
- Branch on exit codes before parsing JSON.