Send Azure outage notifications to Microsoft Teams

If you use Azure services for your mission critical apps, you will want to know when Azure is having an outage that affects you. The Azure health status page is pretty much useless since it usually gets updated hours after an outage occurs. The outage has to affect a large enough percentage of users before it gets reported on the main health status page. There is nothing more frustrating when you know for a fact that there is an outage affecting your apps, only to see the health status page report that "all services are operating normally". This is where Azure Monitor comes in. Azure Monitor promises to alert you sooner and only for outages that affect your subscription which is pretty helpful since I don't care about outages in services/datacenters that I don't use.

Setup

In the Azure portal, go to the Monitor blade, select Alerts, then Add activity log alert. You should see something like this:

For alert criteria, make sure to choose Service Health. In this case, I'm interested in all alert types and levels under the Service Health category.

Under alert actions, the most straightforward options are SMS and email. But in this case, we want to forward these alerts to a Microsoft Teams channel for greater visibility within the organization. This is possible by using the Webhook option. To do this, we can provision a Function or Logic app to consume the Webhook payload, then forward that to a Teams channel of our choosing (or even Slack). That's too much work though. Thankfully, Microsoft Teams lets you send a message to a specific channel via email. We'll use this option instead since its a lot easier. Just go to the channel you want the alerts to go to, click on the three dots next to the channel's name and select "Get email address".

Simply copy and paste this email in the alert form using the email option. That's it! With very little setup, you will now get alerted in Teams for outages that affect your services. This will hopefully help you respond to outages in a more timely manner.

Further resources