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.
Download a PowerPoint file of this architecture.
- A Power Automate flow gets an access token for Microsoft Graph by using Azure AD.
- 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.
- 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.
- When a Microsoft Graph change notification is processed, the message is placed in Event Hubs.
- Azure Functions takes the Microsoft Graph messages from Event Hubs as input.
- 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.
- 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.
- Azure AD 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.
- Event Hubs trigger for Azure Functions enable you to respond to an event sent to an event hub event stream.
- Azure SignalR Service output binding for Azure Functions enables you to send messages by using Azure SignalR Service.
- 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.
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.
- Dan Wahlin | Principal Cloud Developer
For more information about the services and products that are used in this solution, see these articles: