> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/ai-sre/ai-sre-for-administrators/set-up-runbook-management/integrations/collaboration/teams.md).

# Microsoft Teams Integration for Runbooks

Create channels and post incident updates from runbooks.

Harness AI SRE integrates with Microsoft Teams at the project level, enabling automated incident communication and team collaboration.

### Overview <a href="#overview" id="overview"></a>

Teams integration enables your runbooks to do the following:

* Send automated notifications
* Create incident-specific channels
* Schedule and manage meetings
* Share incident updates
* Coordinate response teams

***

### Set up the integration <a href="#set-up-the-integration" id="set-up-the-integration"></a>

Microsoft Teams integration uses OAuth 2.0 for secure authentication.

#### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* **Microsoft Teams admin access:** To authorize the Harness app
* **Harness Project Admin role:** To configure integrations

#### Setup steps <a href="#setup-steps" id="setup-steps"></a>

Connect the Microsoft Teams integration with these steps:

1. Go to **Project Settings**, then **Third Party Integrations (AI SRE)**.

   ![Third-Party Integrations for AI SRE](https://2800896578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwfoiKanOBqsfhP1BJKpx%2Fuploads%2Fgit-blob-37244248e40f71fcc0afc129e4539f65551812dc%2Fthird-party-integrations-connectors.png?alt=media)
2. Click **Connect** for **Microsoft Teams**.
3. Complete the OAuth authorization in the popup window.
4. Grant the requested permissions when prompted.

After authorization completes, the Teams integration status shows as **Connected**.

***

### Use Teams actions in runbooks <a href="#use-teams-actions-in-runbooks" id="use-teams-actions-in-runbooks"></a>

Microsoft Teams actions are configured through the runbook action form in the UI:

1. **In your runbook**, click **New Step**, then **Action**.

   ![New Step Menu](https://2800896578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwfoiKanOBqsfhP1BJKpx%2Fuploads%2Fgit-blob-d6dffd9114e1a1085c8d3178fe25d3a125df1d23%2Frunbook-new-step-menu.png?alt=media)
2. In the **Select Action** dialog, go to the **Communication** category.
3. Select the Teams action you need from the available options.

   ![Select Action Dialog](https://2800896578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwfoiKanOBqsfhP1BJKpx%2Fuploads%2Fgit-blob-c7cf22f07aac035b0e05e4d260cc06c997e4f0e4%2Faction-create-ms-teams-meeting.png?alt=media)
4. Configure the action through a form-based interface. The specific fields depend on the action type you select.

#### Send Teams message action <a href="#send-teams-message-action" id="send-teams-message-action"></a>

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

#### Create Teams channel action <a href="#create-teams-channel-action" id="create-teams-channel-action"></a>

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}}`
* **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 <a href="#best-practices" id="best-practices"></a>

#### Channel management <a href="#channel-management" id="channel-management"></a>

* Use consistent naming conventions
* Archive resolved incident channels
* Limit channel creation to active incidents
* Document channel purpose

#### Message structure <a href="#message-structure" id="message-structure"></a>

* Use clear formatting
* Include severity indicators
* Add relevant links
* Mention appropriate teams

#### Permissions <a href="#permissions" id="permissions"></a>

* Follow least privilege principle
* Regular permission audits
* Document access requirements
* Monitor usage

***

### Common use cases <a href="#common-use-cases" id="common-use-cases"></a>

#### Incident coordination <a href="#incident-coordination" id="incident-coordination"></a>

1. Create dedicated channel
2. Notify stakeholders
3. Share initial assessment
4. Track response actions

#### Status updates <a href="#status-updates" id="status-updates"></a>

1. Send periodic updates
2. Track resolution progress
3. Share incident metrics
4. Document action items

#### Meeting management <a href="#meeting-management" id="meeting-management"></a>

1. Schedule incident bridges
2. Send meeting reminders
3. Share meeting notes
4. Track action items

***

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>A Microsoft Teams runbook action fails with an authentication error</summary>

Re-authorize the Teams connection in Project Settings, confirm you have Teams admin permissions, and verify the OAuth consent was completed.

</details>

<details>

<summary>Creating a Microsoft Teams channel from a runbook fails</summary>

Check the channel naming conventions, confirm you have access to the target team, and ensure the Harness app has been added to the team.

</details>

<details>

<summary>A Microsoft Teams runbook message fails to send</summary>

Confirm the target channel exists, validate the message formatting, and check that you have not exceeded Teams rate limits.

</details>

***

### Next steps <a href="#next-steps" id="next-steps"></a>

* [Slack Integration](/ai-sre/ai-sre-for-administrators/set-up-runbook-management/integrations/collaboration/slack.md): Configure Slack notifications.
* [Zoom Integration](/ai-sre/ai-sre-for-administrators/set-up-runbook-management/integrations/collaboration/zoom.md): Configure Zoom meetings.
* [Runbooks Overview](/ai-sre/ai-sre-for-administrators/set-up-runbook-management/runbooks.md): Return to the runbooks overview.

{% @harness-feedback/feedback %}
