Need details of "notificationQueryOptions" property for presence subscription.

Amir Sohail 411 Reputation points
2022-01-19T07:07:59.07+00:00

Hello,

I hope all of you are feeling well!

I have already created a presence subscription for users and it's working fine but the below statement will refine my requirement.
Problem statement: I want to get a notification when someone status is Busy or DoNotDisturb in M.teams.

I have found a property "notificationQueryOptions" in the subscription resource type so I need the use of "notificationQueryOptions" for presence when someone status is busy/donotdistrub.

166283-query-parameter.jpg

I have attempted some tries using "notificationQueryOptions" but failed.
{

"changeType": "Updated",
"notificationUrl": "https://stg.ngage.dplit.com/zzzzz/xxxxxzzzzz/webhook",
"resource": "/communications/presences?$filter=id in('456e6527-967d-470e-a03f-77a11e71b974')",
"expirationDateTime":"2022-01-20T03:40:45.9356913Z",
******"notificationQueryOptions": "$filter=availability eq 'Busy'",******
"clientState": "secretClientState"

}

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,154 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,715 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,886 questions
0 comments No comments
{count} vote

Accepted answer
  1. Prasad-MSFT 5,621 Reputation points Microsoft Vendor
    2022-01-19T11:57:00.483+00:00

    The Microsoft Graph API uses a webhook mechanism to deliver change notifications to clients. By subscribing Teams presence resource, you can get information about a user's presence, including their availability and user activity.
    This API uses the Presence.Read.All delegated permission.

    Subscribe to a single user’s presence through the /communications/presences/{id} path.
    Subscribe to a maximum number of 650 users by using /communications/presences?$filter=id in ({id},{id}...).
    The {id} represents a user ID GUID.

    Thanks,
    Prasad Das


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.


0 additional answers

Sort by: Most helpful