• Get started
  • Documentation

Integrate Opsgenie with Microsoft Teams V2

Microsoft Teams logo

Watch Integrating Opsgenie and Microsoft Teams on Youtube

What does Opsgenie offer to Microsoft Teams users?

Opsgenie has a powerful integration with Microsoft Teams. Our integration allows Microsoft Teams users to execute actions on Opsgenie alerts within Microsoft Teams such as acknowledge, close, snooze, etc. List your alerts, integrations, policies, and more. Messages are sent to Microsoft Teams channel when an action is executed on Opsgenie alerts. The integration also supports taking actions on the Opsgenie alerts via the action buttons on the cards.

Functionality of the Integration

  • Execute commands on Opsgenie alerts within Microsoft Teams.

  • Forward Opsgenie alert actions to Microsoft Teams channels.

  • Take actions on Opsgenie alerts within Microsoft Teams via action buttons.

Adding Microsoft Teams to your Opsgenie

The process for adding Microsoft Teams to your Opsgenie account changes slightly depending on your Opsgenie data residency. If your Opsgenie is in European service region, scroll down to view instructions for your account.

If you're using Opsgenie's Free or Essentials plan or if you’re using Opsgenie with Jira Service Management's Standard plan, you can add this integration from your team dashboard only. The Integrations page under Settings is not available in your plan.

  1. Go to Teams and select your team.

  2. Select Integrations on the left navigation and then select Add integration.

Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only. Follow the rest of the steps in this section to set up the integration.

Adding Microsoft Teams to an Opsgenie account in US service region

  1. Go to Microsoft Marketplace to add the Opsgenie app to your Microsoft Teams account.

  2. Then, from your Opsgenie account, go to Settings → Integrations. Search for Microsoft Teams and select Add.

  3. Copy the setup command provided in the integration instructions. You’ll use this in the following steps.

Microsoft Teams integration

4. Select Save Integration.

5. Go to your Microsoft Teams account, select Apps from the side navigation menu.

6. Find Opsgenie.

Microsoft Teams find app

7. Select Add to a team.

Microsoft Teams add Opsgenie app

8. Select a channel under a team.

Microsoft Teams select a channel

9. Select Set up a bot.

10. Paste the setup command to the bot which you’ve previously copied when on Opsgenie’s Microsoft Teams integration page and send it to the bot as a message. Your message should be looking like the image below.

Microsoft Teams integration configured

12. You’ll receive the "Integration configured successfully." response from the bot.

13. From now on, you will receive the alert action messages you configured in the integration settings page within this channel.

14. You can also use the bot commands without doing any further configuration within any channels of the team that you added the Opsgenie bot.

15. Repeat the steps above to set the Opsgenie bot to multiple teams.

 

Adding Microsoft Teams to an Opsgenie account in EU service region

  1. If your product data is located in the EU, download Opsgenie’s Microsoft Teams application package to get started.

  2. Then, from your Opsgenie account, go to Settings → Integrations. Search for Microsoft Teams and select Add.

  3. Copy the setup command provided in the integration instructions. You’ll use this in the following steps.

  4. Select Save Integration.

  5. Go to your Microsoft Teams account, select Apps from the left menu.

  6. Select Upload a custom app from the bottom of the side navigation menu.

  7. Upload Opsgenie’s Microsoft Teams application package and install.

  8. When done, Microsoft Teams will display a screen. Select Add to a team.

  9. Select a channel under a team.

  10. Select Set up a bot.

  11. Paste the setup command to the bot which you’ve previously copied when on Opsgenie’s Microsoft Teams integration page and send it to the bot as a message.

  12. You’ll receive the "Integration configured successfully." response from the bot.

  13. From now on, you will receive the alert action messages you configured in the integration settings page within this channel.

  14. You can also use the bot commands without doing any further configuration within any channels of the team that you added the Opsgenie bot.

  15. Repeat the steps above to set the Opsgenie bot to multiple teams.

Although Microsoft Teams is a global Opsgenie integration, it must be associated with a team because of its unique functionality.

Action Mapping Feature

  • Opsgenie allows customers to choose which alert actions to be forwarded to Microsoft Teams.

  • By default, create, acknowledge, unacknowledge, close, add note and assign ownership actions are forwarded to Microsoft Teams.

  • Add more actions or remove the actions that don't need to be forwarded.

  • Forwarding Create action is mandatory.

Using Opsgenie’s Microsoft Teams Bot

Please make sure to verify your Opsgenie account. If your account is not verified you cannot use the Microsoft Teams Bot and the Bot does not respond any of the commands that you send.

  1. Make sure the Execute commands option is enabled in the integration settings page.

  2. You can use the bot commands without further configuration from the channels of the team that the Opsgenie bot was added.

Teams to Opsgenie

Commands you can send to the bot

  • To acknowledge alerts: ack [tinyID tinyID2...]

  • To unacknowledge alerts: unack [tinyID tinyID2...]

  • Snooze alerts for a specified time: snooze [tinyID tinyID2...] for [number] [m/h/d]

  • Escalate alerts to the next level: escalate [tinyID tinyID2...]

  • Escalate alerts with the given name to the next level: escalate [tinyID tinyID2...] for [escalation name]

  • Acknowledge or close all alerts: ackall and closeall

  • Add a recipient to alerts: addrec [user] to [tinyID tinyID2...]

  • Add a team to alerts: addteam [team] to [tinyID tinyID2...]

  • Add tags to alerts: addtag [tag1, tag2...] to [tinyID tinyID2...]

  • Assign alerts to a person: assign [tinyID tinyID2...] to [user]

  • Take ownership of alerts: own [tinyID tinyID2...]

  • Close alerts: close [tinyID tinyID2...]

  • Enable or disable a policy or integration: enable/disable [name]

  • Execute an action on alerts: exec [action] on [tinyID tinyID2...]

  • Get details of an alert: get [tinyID]

  • List all bot commands: help

  • List all open alerts (default), integrations, or policies: list alerts/integrations/policies

  • Add a note to alerts: note [note] to [tinyID tinyID2...]

  • Mute notifications for a specific time (5 mins by default): mute/unmute [Opsgenie username/me] [minutes (optional for mute)]

  • See who is on-call for all schedules or a specific schedule: whoisoncall [schedule (optional)]

  • Create an alert for the specified recipients or teams: alert [message] for [teams/users]

  • Takes on-call for specified time (1 hour by default) of a schedule or team: oncall [me/user] [h/m/d] for [team/schedule/all]

  • Connect Opsgenie account to Microsoft account: connect

  • Activate Microsoft Teams integration: setup [API key]

Chat User Mapping

  1. Require Matching a User is used to force matching Microsoft Teams accounts with Opsgenie accounts.

  2. Associate your Microsoft Teams account to your Opsgenie account by using the @Opsgenie connect command.

  3. Chat user mapping flow:

Chat user mapping
Connection success

 

Permissions required by Opsgenie

The following permissions are required to read data and perform actions on your behalf:

  • Read user identity information: Allows Opsgenie to read your Microsoft Teams account and identity details to connect your Opsgenie account with your Microsoft account.

  • Send messages to team members: Allows Opsgenie to send alert-related messages in chats with team members on Microsoft Teams.

Still need help?

The Atlassian Community is here for you.