In this section of the blog series, we’ll walk through the steps to create a Microsoft Graph subscription for Teams presence updates based on the Custom connector created on the previous post and configure a Power Automate flow to receive and process these updates through Azure Event Hub.
Step 1: Creating a Microsoft Graph Subscription for Teams Presence
Microsoft Graph allows subscription to presence changes via the /communications/presences/{userId} endpoint. Subscriptions require:
Tip: Presence subscriptions must be renewed every hour. This can be handled through a scheduled Power Automate flow or a timer-based Azure Function.
Step 2: Receiving Notifications via Azure Event Hub
Azure Event Hub serves as a high-throughput ingestion pipeline for Microsoft Graph notifications. After the subscription is created, presence change events are pushed into the specified Event Hub.
Each event includes metadata about the subscription, user, and timestamp, allowing you to react to presence changes in near real-time.
Step 3: Creating a Power Automate Flow to Process Presence Updates
Now that presence updates are routed into Azure Event Hub, we’ll use Power Automate to process these updates.
Steps to Configure:
Example Use Case:
IF presence = ‘Busy’
→ Post “User is busy now” in Teams channel
What’s Next?
In the next part of this blog series, we will:
Subscribe to my blog with your email address using the widget on the right side or on the bottom of this page to have new articles sent directly to your inbox the moment I publish them.
Original Post https://ashiqf.com/2025/04/30/enabling-real-time-alerts-using-microsoft-graph-in-power-platform-part-2/