Automatically Schedule Microsoft Teams Do Not Disturb Presence Based on Outlook Calendar Events
In this article I will be showing you how you can automatically have Microsoft Teams set its presence to Do Not Disturb, or any other presence, based on events in your Outlook Calendar. I also looked into leveraging Power Automate but it began to require premium connectors and at that cost, going the serverless automation route was much cheaper.
An overview of this automation is as follows:
- Run on a set schedule.
- Get all users within the tenant, if the user does not have a mailbox, proceed to the next user, if the user does have a mailbox proceed to the next step.
- Get the users events that will occur within the next 1 hour (configurable value)
- See if there is an event that matches what we are looking for. In my instance, if an event title/subject is “DND” (not case-sensitive) then proceed to the next step, otherwise go to