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.
Quick Setup
Section titled “Quick Setup”-
Create Teams Webhook
- Open your Microsoft Teams app
- Navigate to the target channel
- Click ”••• More options” → “Connectors”
- Find “Incoming Webhook” and configure
-
Configure in 9n9s
- Go to Organization Settings > Notification Channels
- Click “Add Channel” → “Microsoft Teams”
- Enter your webhook URL and settings
- Click “Create Channel”
-
Test Integration
- Click “Send Test Message”
- Verify message appears in Teams channel
- Check formatting and mentions
Prerequisites
Section titled “Prerequisites”Microsoft Teams Requirements
Section titled “Microsoft Teams Requirements”- 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
9n9s Requirements
Section titled “9n9s Requirements”- Organization Admin: Admin role to configure notification channels
- Active Subscription: Teams integration available on all plans
Setting Up Teams Webhook
Section titled “Setting Up Teams Webhook”Step 1: Create Incoming Webhook in Teams
Section titled “Step 1: Create Incoming Webhook in Teams”-
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
-
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
-
Configure Webhook
- Name: “9n9s Monitoring Alerts”
- Upload Image: Upload 9n9s logo or relevant icon (optional)
- Click “Create”
-
Copy Webhook URL
- Copy the provided webhook URL
- Click “Done” to complete setup
- Save the URL securely for 9n9s configuration
Step 2: Add Teams Channel in 9n9s
Section titled “Step 2: Add Teams Channel in 9n9s”-
Navigate to Notification Channels
- Log into app.9n9s.com
- Go to Organization Settings
- Click “Notification Channels”
-
Create Teams Channel
- Click “Add Channel” button
- Select “Microsoft Teams” from integration types
- Enter webhook configuration
-
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
Step 3: Configure Message Format
Section titled “Step 3: Configure Message Format”-
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
-
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
Message Customization
Section titled “Message Customization”Adaptive Card Format
Section titled “Adaptive Card Format”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" } ] } } ]}Color Themes
Section titled “Color Themes”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
Message Actions
Section titled “Message Actions”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}}" } ]}Advanced Configuration
Section titled “Advanced Configuration”Alert Routing by Team
Section titled “Alert Routing by Team”Configure different Teams channels for different types of alerts:
-
Critical Operations Channel
- Channel: “Critical Alerts”
- Mentions: @channel for immediate attention
- Conditions:
criticality=critical
-
Development Team Channel
- Channel: “Dev Alerts”
- Mentions: Development team members
- Conditions:
environment=development
-
Infrastructure Team Channel
- Channel: “Infrastructure Alerts”
- Mentions: Platform team
- Conditions:
service=infrastructure
Custom Webhook Configuration
Section titled “Custom Webhook Configuration”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, }, "standard_alerts": { "mention_team": false, "mention_users": [] } }, "rate_limiting": { "max_per_minute": 20, "burst_limit": 5 }}Enterprise Features
Section titled “Enterprise Features”For Office 365 Enterprise customers:
-
Power Automate Integration
- Create flows triggered by 9n9s webhooks
- Automate incident creation in ServiceNow
- Send follow-up notifications
-
Graph API Integration
- Enhanced user/team lookup
- Calendar integration for on-call schedules
- SharePoint documentation links
-
Compliance Features
- Message retention policies
- Data loss prevention (DLP) support
- Audit trail integration
Security and Compliance
Section titled “Security and Compliance”Webhook Security
Section titled “Webhook Security”-
URL Protection
- Teams webhook URLs are tenant-specific
- Include secret tokens for verification
- Use HTTPS-only connections
-
Access Control
- Connector permissions managed by IT admins
- Channel-level access controls
- Regular audit of active connectors
Data Compliance
Section titled “Data Compliance”-
Data Residency
- Messages stored according to Teams data policies
- Compliance with regional requirements
- Integration with Microsoft Purview
-
Retention Policies
- Follow organization’s message retention rules
- Automatic archival and deletion
- Legal hold capabilities
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Messages Not Appearing:
-
Webhook Configuration
- Verify webhook URL is correct and active
- Check if connector was removed from channel
- Ensure webhook hasn’t expired
-
Permission Issues
- Verify user has permission to add connectors
- Check if connectors are disabled by admin
- Ensure proper channel membership
Formatting Problems:
-
Adaptive Card Issues
- Verify card schema is valid
- Check for unsupported card elements
- Test with simplified card format
-
Action Buttons Not Working
- Verify URLs are accessible
- Check for proper URL encoding
- Test links independently
Rate Limiting:
- Teams API Limits
- Teams has rate limits for webhooks
- 9n9s automatically handles retries
- Consider using multiple webhooks for high volume
Error Responses
Section titled “Error Responses”Common Teams webhook errors:
400 Bad Request: Invalid message format or missing required fields404 Not Found: Webhook URL not found or connector removed429 Too Many Requests: Rate limit exceeded502 Bad Gateway: Teams service temporarily unavailable
Testing
Section titled “Testing”Test your Teams integration:
# Test webhook with simple messagecurl -X POST \ -H "Content-Type: application/json" \ -d '{ "text": "Test message from 9n9s monitoring" }' \ "YOUR_TEAMS_WEBHOOK_URL"
# Test with adaptive cardcurl -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"Best Practices
Section titled “Best Practices”Channel Organization
Section titled “Channel Organization”-
Dedicated Channels
- Create monitoring-specific channels
- Use clear naming conventions
- Separate channels by team or service
-
Channel Management
- Pin important monitoring information
- Use channel descriptions to explain purpose
- Set appropriate notification settings
Message Design
Section titled “Message Design”-
Clear Communication
- Use concise, actionable language
- Include relevant context and links
- Provide clear next steps
-
Visual Hierarchy
- Use consistent color coding
- Structure information logically
- Include relevant icons and formatting
Enterprise Integration
Section titled “Enterprise Integration”-
Governance
- Establish connector approval processes
- Document webhook usage and purpose
- Regular review of active integrations
-
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.