Testing Microsoft Graph Presence APIs
Working with Microsoft Graph Presence APIs can be tricky. Between understanding different authentication flows, managing presence-precedence rules, and figuring out which endpoints to use for different scenarios, it’s easy to get lost in the Microsoft documentation.
As a product manager at AnywhereNow (CCaaS vendor), I face this challenge in a very practical way. Our CCaaS agent application integrates with Microsoft’s Unify model and needs to follow the native Teams presence logic. That means when an agent gets on a call, their presence must switch to “In a call,” and when the call ends it must return to the state that was active before — all while overlaying CCaaS-specific behaviors such as after-call work or custom busy states.
In order to quickly check some of that logic, I built the Graph Presence API Tester — a lightweight web tool that makes it easier to experiment with and understand Microsoft Graph Presence APIs by simply playing with them.
The app uses OAuth 2.0 client-credentials authentication, so you can test presence operations without signing in as an end-user.
What It Does
The tool provides a clean, browser-based interface to test all the major presence operations and observe their effect on the user’s aggregated presence:
- Get Presence — retrieve the current aggregated presence for a user
- Set Presence — set either user-preferred presence or application-session presence.
- Clear Presence— remove either the application session or the user-preferred presence
- Who Am I — confirm the user account being targeted
Key Features
- Real-time Testing — make actual Graph API calls and immediately see the formatted responses, so you don’t have to guess the logic by reading docs alone
- Visual Feedback — presence states are displayed with Teams-style color coding, making it easier to understand the current state at a glance
- Authentication Made Simple — just enter your Tenant ID, Application ID, and Client Secret; the tool automatically handles the OAuth 2.0 client-credentials flow
Acknowledgments
Special thanks to Tom van Leijsen for sharing his original PowerShell script and for clarifying how the Microsoft Graph Presence APIs work. His work provided the foundation and insights that made this web-based tool possible.
Get Stoyan Stoitsev’s stories in your inbox
Join Medium for free to get updates from this writer.
Thanks also to V0 and OpenAI Codex for enabling the rapid development of the prototype, in other words, I vibe-coded this.
Try It Out
You can access the tool here: https://v0-graph-presence-api-tester.vercel.app/
All you need is:
- a test Tenant ID
- a registered app’s Client ID and Client Secret with the correct Graph permissions (typically Presence.ReadWrite.All)
With these, you can explore how different API calls affect a user’s presence and gain hands-on understanding of presence-precedence rules in Teams.








