Microsoft Teams Integration for Runbooks
Last updated on
Harness AI SRE integrates with Microsoft Teams at the project level, enabling automated incident communication and team collaboration.
Overview
Teams integration enables your runbooks to:
- Send automated notifications
- Create incident-specific channels
- Schedule and manage meetings
- Share incident updates
- Coordinate response teams
Integration Setup
Prerequisites
- Microsoft Teams admin access
- Azure AD application registration
- Harness Project Admin role
Setup Steps
- Navigate to Project Settings → Third Party Integrations (AI SRE)
- Select Microsoft Teams from the available integrations
- Configure Azure AD settings:
- Application (client) ID
- Directory (tenant) ID
- Client secret
- Grant required permissions:
- Channel.Create
- ChannelMessage.Send
- Team.ReadBasic.All
- TeamMember.ReadWrite.All
- Test the connection
Verification
- Test connector connectivity
- Send test message
- Create test channel
- Verify permissions
Using Teams Actions in Runbooks
When you add Microsoft Teams actions to a runbook, you'll configure them through a form-based interface. The specific fields depend on the action type you select.
Send Teams Message Action
Sends a message to a specified Teams channel.
Form Fields:
- Team: Team name or ID
- Channel: Channel name within the team
- Message: Message text to send
- Supports Mustache variables:
{{Activity.title}},{{Activity.summary}} - Can include formatting and mentions
- Supports Mustache variables:
Create Teams Channel Action
Creates a new Teams channel for incident coordination.
Form Fields:
- Team: Team where the channel will be created
- Channel Name: Name for the new channel
- Example:
incident-{{Activity.id}}
- Example:
- Description: Channel description
Available Mustache Variables:
{{Activity.title}}- AI SRE incident title{{Activity.id}}- AI SRE incident ID{{Activity.severity}}- AI SRE incident severity{{Activity.status}}- AI SRE incident status- Any custom incident fields configured in your incident template
Best Practices
Channel Management
- Use consistent naming conventions
- Archive resolved incident channels
- Limit channel creation to active incidents
- Document channel purpose
Message Structure
- Use clear formatting
- Include severity indicators
- Add relevant links
- Mention appropriate teams
Permissions
- Follow least privilege principle
- Regular permission audits
- Document access requirements
- Monitor usage
Common Use Cases
Incident Coordination
- Create dedicated channel
- Notify stakeholders
- Share initial assessment
- Track response actions
Status Updates
- Send periodic updates
- Track resolution progress
- Share incident metrics
- Document action items
Meeting Management
- Schedule incident bridges
- Send meeting reminders
- Share meeting notes
- Track action items
Troubleshooting
Common Issues
-
Authentication Failures
- Verify Azure AD settings
- Check permission scopes
- Confirm application registration
-
Channel Creation Errors
- Check naming conventions
- Verify team access
- Confirm bot permissions
-
Message Failures
- Validate channel existence
- Check message formatting
- Verify rate limits