Forum Discussion
Subscribe to changes in Microsoft Teams presence – Now in Preview!
We’ve been able to query Microsoft Graph for the presence state of Microsoft Teams users for a while, but only via a simple GET call. There hasn’t been a way to subscribe to changes, other than polling that GET call every minute or so.
Now, however, there is a way to do this! You can subscribe to change notifications for presence via a new presence subscription API which is now in Public Preview.
This subscription is similar to other Graph webhooks. See my blog post: How to: Use the new Webhooks for Microsoft Teams Channel & Chat Messages for more details on how to use them generally.
This doesn’t replace the existing GET method which can you continue to use. This is simply a nicer way to be told about changes to presence state.
- Dirk_SlootmaekersCopper Contributor
tomorgan Hello Tom,
I have implemented the webhook and it works great ! notifications are received in approx 5 seconds after the presence is changed !
My questions is regarding the lifecycle events. I registered the
lifecycleNotificationUrl in the subscription, but it is never called. Meaning that when the subscription is expired I'm not notified to reactive it.Is this not implemented?thanksDirk