MS Graph API: subscribe presence for a large number of user

Brass Contributor

Hi everybody,

 

which possibilites do we have to do a perfomant subscribtion the MS Teams presence status for a large number (>5000) of users via the MS Graph API?

 

Thanks for your help.

Regards

Gerd

 

5 Replies

@relkniw - 

You can create a subscription to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph. - https://learn.microsoft.com/en-us/graph/api/subscription-post-subscriptions?view=graph-rest-1.0&tabs...

 

Hi Meghana,

I know that and I use that functionality:

But how many user can I add to "userIsString" in this case?

var sub = new Microsoft.Graph.Subscription
{
ChangeType = "updated",
NotificationUrl = Config.CurrentValue.CallBackUrl + ConfigurationConstants.CallbackSuffixPresenceNotifications,
Resource = $"/communications/presences?$filter=id in {userIdsString}",
//Resource = $"/communications/presences/{pUserId}",
ExpirationDateTime = DateTime.UtcNow.AddMinutes(Config.CurrentValue.PresenceSettings.SubscriptionTimeout),
ClientState = Config.CurrentValue.SecretClientState,
};

var newSubscription = await graphUserClient
.Subscriptions
.Request()
.AddAsync(sub);

Regards

Gerd


And so I come back to my previous question:

Which possibilites do we have to do a perfomant subscribtion the MS Teams presence status for a large number (>5000) of users via the MS Graph API? Because we have customer with so much user and we need their presence states.
Engineering team has said currently, the only option is using multiple users to create subscriptions to cover the 5000 users or more users.