Skip to content

Microsoft Teams Integration

Microsoft Teams integration allows you to receive 9n9s alerts directly in your Teams channels with rich adaptive cards, proper formatting, and team notifications for enterprise environments.

  1. Create Teams Webhook

    • Open your Microsoft Teams app
    • Navigate to the target channel
    • Click ”••• More options”“Connectors”
    • Find “Incoming Webhook” and configure
  2. Configure in 9n9s

    • Go to Organization Settings > Notification Channels
    • Click “Add Channel”“Microsoft Teams”
    • Enter your webhook URL and settings
    • Click “Create Channel”
  3. Test Integration

    • Click “Send Test Message”
    • Verify message appears in Teams channel
    • Check formatting and mentions
  • Team Membership: You must be a member of the target team
  • Channel Permissions: Ability to add connectors to the channel
  • Organization Policy: Connectors must be enabled by your IT admin
  • Teams Version: Works with Teams desktop, web, and mobile apps
  • Organization Admin: Admin role to configure notification channels
  • Active Subscription: Teams integration available on all plans
  1. Access Channel Settings

    • Open Microsoft Teams
    • Navigate to your target channel
    • Click the ”••• More options” button next to the channel name
    • Select “Connectors” from the dropdown menu
  2. Find Incoming Webhook Connector

    • In the Connectors page, search for “Incoming Webhook”
    • Click “Add” next to the Incoming Webhook connector
    • Click “Add” again to configure it
  3. Configure Webhook

    • Name: “9n9s Monitoring Alerts”
    • Upload Image: Upload 9n9s logo or relevant icon (optional)
    • Click “Create”
  4. Copy Webhook URL

    • Copy the provided webhook URL
    • Click “Done” to complete setup
    • Save the URL securely for 9n9s configuration
  1. Navigate to Notification Channels

    • Log into app.9n9s.com
    • Go to Organization Settings
    • Click “Notification Channels”
  2. Create Teams Channel

    • Click “Add Channel” button
    • Select “Microsoft Teams” from integration types
    • Enter webhook configuration
  3. Channel Configuration

    • Channel Name: “Teams Alerts” (internal reference)
    • Webhook URL: Paste the Teams webhook URL
    • Card Format: Choose adaptive card or simple message format
    • Theme Color: Brand color for message cards
  1. Adaptive Card Settings

    • Rich Cards: Enable Teams adaptive card formatting
    • Color Coding: Automatic colors based on alert severity
    • Actions: Include action buttons for quick responses
    • Facts: Structured data presentation
  2. Mention Configuration

    • Team Mentions: Configure when to mention entire team
    • User Mentions: Specific user mentions for critical alerts
    • Channel Mentions: @channel for urgent notifications
    • Mention Conditions: Criteria for triggering mentions

Teams messages use adaptive cards for rich formatting:

Critical Alert Example:

{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"version": "1.3",
"body": [
{
"type": "TextBlock",
"text": "🚨 CRITICAL ALERT",
"weight": "bolder",
"color": "attention",
"size": "large"
},
{
"type": "TextBlock",
"text": "API Health Check is DOWN",
"size": "medium",
"weight": "bolder"
},
{
"type": "FactSet",
"facts": [
{
"title": "Status:",
"value": "DOWN (was UP)"
},
{
"title": "Duration:",
"value": "5 minutes"
},
{
"title": "Environment:",
"value": "production"
},
{
"title": "Project:",
"value": "Core Services"
}
]
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "View Monitor",
"url": "https://app.9n9s.com/monitors/mon_123"
},
{
"type": "Action.OpenUrl",
"title": "View Logs",
"url": "https://app.9n9s.com/monitors/mon_123/logs"
}
]
}
}
]
}

Adaptive cards use theme colors based on alert severity:

  • 🟢 Good (good): UP, Recovered, Resolved
  • 🟡 Warning (warning): DEGRADED, Late, Warning
  • 🔴 Attention (attention): DOWN, Critical, Failed
  • 🔵 Accent (accent): Maintenance, Scheduled
  • ⚫ Default (default): Paused, Unknown

Include interactive actions in your alerts:

{
"actions": [
{
"type": "Action.OpenUrl",
"title": "View Dashboard",
"url": "{{links.monitor}}"
},
{
"type": "Action.OpenUrl",
"title": "Create Incident",
"url": "{{links.incident_creation}}"
},
{
"type": "Action.OpenUrl",
"title": "Runbook",
"url": "{{metadata.runbook_url}}"
}
]
}

Configure different Teams channels for different types of alerts:

  1. Critical Operations Channel

    • Channel: “Critical Alerts”
    • Mentions: @channel for immediate attention
    • Conditions: criticality=critical
  2. Development Team Channel

    • Channel: “Dev Alerts”
    • Mentions: Development team members
    • Conditions: environment=development
  3. Infrastructure Team Channel

    • Channel: “Infrastructure Alerts”
    • Mentions: Platform team
    • Conditions: service=infrastructure

Advanced webhook settings for enterprise environments:

{
"webhook_url": "https://your-tenant.webhook.office.com/webhookb2/...",
"card_format": "adaptive",
"theme_color": "#0078d4",
"include_actions": true,
"mention_config": {
"critical_alerts": {
"mention_team": true,
"mention_users": ["[email protected]", "[email protected]"]
},
"standard_alerts": {
"mention_team": false,
"mention_users": []
}
},
"rate_limiting": {
"max_per_minute": 20,
"burst_limit": 5
}
}

For Office 365 Enterprise customers:

  1. Power Automate Integration

    • Create flows triggered by 9n9s webhooks
    • Automate incident creation in ServiceNow
    • Send follow-up notifications
  2. Graph API Integration

    • Enhanced user/team lookup
    • Calendar integration for on-call schedules
    • SharePoint documentation links
  3. Compliance Features

    • Message retention policies
    • Data loss prevention (DLP) support
    • Audit trail integration
  1. URL Protection

    • Teams webhook URLs are tenant-specific
    • Include secret tokens for verification
    • Use HTTPS-only connections
  2. Access Control

    • Connector permissions managed by IT admins
    • Channel-level access controls
    • Regular audit of active connectors
  1. Data Residency

    • Messages stored according to Teams data policies
    • Compliance with regional requirements
    • Integration with Microsoft Purview
  2. Retention Policies

    • Follow organization’s message retention rules
    • Automatic archival and deletion
    • Legal hold capabilities

Messages Not Appearing:

  1. Webhook Configuration

    • Verify webhook URL is correct and active
    • Check if connector was removed from channel
    • Ensure webhook hasn’t expired
  2. Permission Issues

    • Verify user has permission to add connectors
    • Check if connectors are disabled by admin
    • Ensure proper channel membership

Formatting Problems:

  1. Adaptive Card Issues

    • Verify card schema is valid
    • Check for unsupported card elements
    • Test with simplified card format
  2. Action Buttons Not Working

    • Verify URLs are accessible
    • Check for proper URL encoding
    • Test links independently

Rate Limiting:

  1. Teams API Limits
    • Teams has rate limits for webhooks
    • 9n9s automatically handles retries
    • Consider using multiple webhooks for high volume

Common Teams webhook errors:

  • 400 Bad Request: Invalid message format or missing required fields
  • 404 Not Found: Webhook URL not found or connector removed
  • 429 Too Many Requests: Rate limit exceeded
  • 502 Bad Gateway: Teams service temporarily unavailable

Test your Teams integration:

Terminal window
# Test webhook with simple message
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"text": "Test message from 9n9s monitoring"
}' \
"YOUR_TEAMS_WEBHOOK_URL"
# Test with adaptive card
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"type": "message",
"attachments": [{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"version": "1.3",
"body": [{
"type": "TextBlock",
"text": "Test Alert from 9n9s"
}]
}
}]
}' \
"YOUR_TEAMS_WEBHOOK_URL"
  1. Dedicated Channels

    • Create monitoring-specific channels
    • Use clear naming conventions
    • Separate channels by team or service
  2. Channel Management

    • Pin important monitoring information
    • Use channel descriptions to explain purpose
    • Set appropriate notification settings
  1. Clear Communication

    • Use concise, actionable language
    • Include relevant context and links
    • Provide clear next steps
  2. Visual Hierarchy

    • Use consistent color coding
    • Structure information logically
    • Include relevant icons and formatting
  1. Governance

    • Establish connector approval processes
    • Document webhook usage and purpose
    • Regular review of active integrations
  2. Monitoring Health

    • Monitor webhook delivery success
    • Track message engagement
    • Regular testing of critical integrations

Microsoft Teams integration provides seamless monitoring alerts within your enterprise collaboration platform. Configure channels and mentions appropriately to ensure your team stays informed about system health while maintaining productivity.