Microsoft Service Status Sensor

Has anyone have success in creating Microsoft Services status sensor/s??

https://admin.microsoft.com/servicestatus
https://status.office.com/

1 Like

I’m certain there will be much better answers than my solution, but I was able to quickly write this up for you:

sensors:
  - platform: rest
    resource: https://admin.microsoft.com/api/servicestatus/index
    name: microsoft
    value_template: "{{ value_json.IsAllUp }}"
    json_attributes:
      - Services

  - platform: template
    sensors:
      outlook:
        value_template: '{{ states.sensor.microsoft[0].attributes["IsUp"] }}'
      one_drive:
        value_template: '{{ states.sensor.microsoft[1].attributes["IsUp"] }}'

You will just need to continue on with the template sensors to grab the other 5 services listed on your first link.

I’ve never really needed templates but I worked this out, in case someone knows how to turn this into a dynamic series of sensors with the above calls:

{% for state in state_attr('sensor.microsoft', 'Services') %}
{{ state.Name }} is {{ state.IsUp}}
{% endfor %}

-----
Outlook.com is True

OneDrive is True

Microsoft To-Do is True

Skype is True

Office for the web (Consumer) is True

Microsoft Whiteboard is True

Your Phone is True

Teams (Consumer) is True
1 Like

Thanks for the quick solution! This worked for me. I setup my sensors with a scan_interval of 60 and I manually changed the value of the sensors to False using Developer Tools. The value stayed False, though the actual value of the sensor from the Microsoft’s site is True.

How do I get the scan_interval to work??