Real-time presence with Microsoft 365, Azure, and Power Platform

Azure Functions
Microsoft Graph
Microsoft Power Platform
Azure SignalR Service
Azure Event Hubs

Solution ideas

This article is a solution idea. If you'd like us to expand the content with more information, such as potential use cases, alternative services, implementation considerations, or pricing guidance, let us know by providing GitHub feedback.

This solution provides presence for a JavaScript front-end application. It uses Microsoft Graph and Microsoft Entra ID to provide real-time presence information. It also uses Power Automate, Azure Event Hubs, Azure Functions, and Azure SignalR Service.


Diagram that shows a solution for providing teammate presence information.

Download a PowerPoint file of this architecture.


  1. A Power Automate flow gets an access token for Microsoft Graph by using Microsoft Entra ID.
  2. The Power Automate flow retrieves members of the selected team who are on Microsoft Teams. The flow creates a Microsoft Graph presence API subscription and updates it every hour to track changes in presence for the selected team members.
  3. When there's a change in member presence, the Microsoft Graph Change Tracking application policy gets a connection string to Event Hubs from Key Vault.
  4. When a Microsoft Graph change notification is processed, the message is placed in Event Hubs.
  5. Azure Functions takes the Microsoft Graph messages from Event Hubs as input.
  6. Azure SignalR Service is defined as an output in Azure Functions. This allows a browser to subscribe to Azure SignalR Service and receive messages in real time.
  7. To receive the presence messages in the browser, an app subscribes to Azure SignalR Service.


  • Microsoft Graph provides a unified programmability model that you can use to access the tremendous amount of data in Microsoft 365, Windows 10, and Enterprise Mobility + Security.
  • Microsoft Entra ID is the Microsoft cloud-based identity and access management service that helps users sign in and access resources.
  • Power Automate helps you automate repetitive manual tasks by recording mouse clicks, keystrokes, and copy-and-paste steps from your desktop.
  • Key Vault is a cloud service for storing and accessing secrets with high security.
  • Event Hubs is a scalable event processing service that ingests and processes large volumes of events and data, with low latency and high reliability.
  • Azure Functions enables you to write event-driven serverless code, maintain less infrastructure, and save money.
  • Azure SignalR Service simplifies the process of adding real-time web functionality to applications over HTTP.
  • Azure Static Web Apps automatically builds and deploys full stack web apps to Azure from a code repository.

Scenario details

Collaboration tools play a significant role in creating productive workspaces for teams. Microsoft 365 tools like Microsoft Teams, Word, and PowerPoint online bring people together and help them to work more effectively. In addition to supporting real-time changes to documents and data, these tools support real-time presence information. Presence makes it easy to know your teammates' availability and see when they join a collaboration session.

You can also add presence to custom collaboration applications by using Microsoft Cloud services. This solution uses Microsoft Cloud APIs and services to enable real-time presence capabilities in custom applications. As people become available in Microsoft Teams, they can be invited to a collaboration session.

Potential use cases

This solution applies to companies that use custom applications that require:

  • Real-time change tracking on Microsoft 365 data.
  • Broadcasting of data to the browser in real time.
  • Notifications to application users when a person's availability changes.
  • A secure way to retrieve secrets that are used in an application.

Deploy this scenario

Get a code sample that demonstrates this solution.


This article is maintained by Microsoft. It was originally written by the following contributors.

Principal author:

Next steps

For more information about the services and products that are used in this solution, see these articles: