Skip to main content

Microsoft Teams

InfraSage supports Microsoft Teams for alert notifications and interactive approval flows using Adaptive Cards. Feature parity with the Slack integration.

Configuration​

TEAMS_WEBHOOK_URL=https://mycompany.webhook.office.com/webhookb2/xxx@yyy/IncomingWebhook/zzz/aaa

Create a webhook in Teams: Channel → More options → Connectors → Incoming Webhook → Configure.

Alert notifications​

InfraSage sends alerts as Adaptive Cards, which Teams renders as formatted cards:

{
"type": "message",
"attachments": [{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.4",
"body": [
{
"type": "TextBlock",
"text": "🚨 Anomaly Detected — payment-api",
"weight": "Bolder",
"size": "Medium",
"color": "Attention"
},
{
"type": "FactSet",
"facts": [
{"title": "Service", "value": "payment-api"},
{"title": "Score", "value": "0.93 (Critical)"},
{"title": "Root Cause", "value": "CPU saturation from DB connection pool exhaustion"},
{"title": "Confidence", "value": "92%"},
{"title": "Blast Radius", "value": "user-service, checkout-service"}
]
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "View in InfraSage",
"url": "https://infrasage.mycompany.com/incidents/anom-7f3d"
}
]
}
}]
}

Azure AD authentication​

For enterprise deployments with Azure AD SSO:

TEAMS_AZURE_TENANT_ID=your-tenant-id
TEAMS_AZURE_CLIENT_ID=your-client-id
TEAMS_AZURE_CLIENT_SECRET=your-client-secret

InfraSage then authenticates through the Microsoft identity platform to send messages to protected Teams channels.

Runbook approval flow​

InfraSage sends interactive Adaptive Cards for runbook approvals. Users click Approve or Reject directly in Teams. Approver identity is captured via Teams user context and stored in the InfraSage audit log.

Notification rules​

Same configuration options as Slack:

TEAMS_MIN_ANOMALY_SCORE=0.6
TEAMS_SERVICE_FILTER=payment-api,checkout-service
TEAMS_QUIET_HOURS_START=23:00
TEAMS_QUIET_HOURS_END=07:00
TEAMS_QUIET_HOURS_TZ=Europe/London

Verification​

curl -X POST "$TEAMS_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d '{
"text": "InfraSage Teams integration is working!"
}'