Graph API - Communication/presence Subscription consistently not receiving changes

Alex Gurr 1 Reputation point
2021-10-20T02:31:58.06+00:00

We're using the preview subscription API to subscribe to teams user presence changes. Our current flow is the following:

  • A user accesses our app
  • We delete any existing subscription (as you can only have one at a time)
  • We create a new subscription with the new user ID added to the ids filter const data = {
    changeType: 'updated',
    resource: /communications/presences?$filter=id in (${userIds.join(',')}),
    notificationUrl: config.MS_WEBHOOK_NOTIFICATION_URL,
    expirationDateTime: subExpiry,
    clientState: config.MS_WEBHOOK_SECRET
    };

The initial presence works correctly when we get the individual presence, however 80% of the time, changes to any of these user's presences does not call our callback endpoint URL. Note. this payload is accepted correctly with a 200, and get subscriptions returns us the correct sub with correct user IDs. The subscription works around 10/20% of the time.

Any ideas?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.