Teams- Subscription to user presence updates
As it stands, the API to get Teams presence requires constant polling in order to track a user's presence in near-real time. It would be more useful if we could subscribe to all presence updates using a webhook.

We currently have a preview version of the feature in beta. You can read more about it and try it out here https://developer.microsoft.com/en-us/graph/blogs/get-notified-of-presence-changes-the-microsoft-graph-presence-subscription-api-is-now-available-in-public-preview/
7 comments
-
Anonymous commented
Would it be possible to set the presence webhook for ALL users?
Passing user IDs in a filter and the 650 max is quite limiting for a full presence integration.
-
Martin Pfeifer commented
I have the same problem as David Shevin. I would really like the id to be returned, so that I could update users in real time via a webhook.
-
David Shevin commented
I have tested the webhook notifications and the id field is missing so there is no way to see whom the notification is for when using a filter. And if the odataid is supposed to indicate that information it is just a repeat of the resource. If you have 650 ids in your filter then that information is included in both the Resource and odata.id fields. In addition select does not seem to work to reduce this extra information.
{"SubscriptionId":"9fceaa25-8807-4db3-97bf-8b1adb3472f9","ClientState":"ac3d2628-32ab-40f3-9c37-6ff90f65f27d","ChangeType":"updated","Resource":"communications/presences?$filter=id in ('8be156c8-5b82-4231-962c-b9718cb03516', 'e4d22a04-e621-486a-9baa-1d9488a0227d', 'fc83f62c-9e66-434b-8685-410fa6574154', '4487d579-3652-4974-90b5-b360a846c9a1')","SubscriptionExpirationDateTime":"2020-08-05T08:02:39.7806405+00:00","resourceData":{"@odata.type":"#Microsoft.Graph.presence","@odata.id":"communications/presences?$filter=id+in+('8be156c8-5b82-4231-962c-b9718cb03516', 'e4d22a04-e621-486a-9baa-1d9488a0227d', 'fc83f62c-9e66-434b-8685-410fa6574154', '4487d579-3652-4974-90b5-b360a846c9a1')","id":null,"activity":"Busy","availability":"Busy"},"TenantId":"7856ed91-b680-49cd-85ab-37a83f89a6d0"}
-
Dirk commented
I'm testing this, but failed to get lifecycle notifications via the lifecycleNotificationUrl.
It simply isn't called (the notifications etc are working very well, they are received in approx 5 seconds). The issue is that when the subscription expires I'm not notified. -
Craig Dewar commented
I am also interested in how this is going
-
Akhilesh Singh commented
Hi Vincent, do we have any timelines for the subscription feature?
-
Muhammad Murad Haider commented
Any update on this??