Facing issue in Presence subscription expiration time.

Amir Sohail 411 Reputation points
2022-01-12T06:08:08.293+00:00

Hello,

I hope all of you are feeling well!

I have created a presence subscription for multiple users and I have set 2 days for the expiration of the presence subscription but my subscription expires every hour.

****Create presence subscription****
{
"changeType": "Updated",
"notificationUrl": "https://stg.xyz.rr.com/zzzi/yyyyy/webhook",
"resource": "/communications/presences/?$filter=id in('7e7e6527-967d-470e-a03f-77a11e71b974','d451ed46-85a3-4457-b564-b9778f388c3e','74741d00-9861-483d-9b0c-856a6e44701b','51883b74-7cff-47e1-beca-9102002cfe76')",

****"expirationDateTime":"2022-01-15T03:40:45.9356913Z",****

"notificationQueryOptions": "$filter = isFetchable eq true",
"clientState": "secretClientState"

}

****but after the creation of my presence subscription, the response JSON from subscription API shows me below JSON****
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions/$entity",
"id": "b8f4c1c4-da25-4f11-be2e-7c43b179e6af",
"resource": "/communications/presences/?$filter=id in('7e7e6527-967d-470e-a03f-77a11e71b974','d451ed46-85a3-4457-b564-b9778f388c3e','345345345-9861-483d-9b0c-856a6e44701b','51883b74-7cff-47e1-beca-9102002cfe76')",
"applicationId": "345345345-f638-4215-8871-749ed7bc7198",
"changeType": "updated",
"clientState": "secretClientState",
"notificationUrl":"https://stg.xyz.rr.com/zzzi/yyyyy/webhook",
"notificationQueryOptions": "$filter = isFetchable eq true",
"lifecycleNotificationUrl": null,
"expirationDateTime": "2022-01-12T06:12:58.739015Z",
"creatorId": "23423424-6ffa-4b23-bb47-431d535dc1b4",
"includeResourceData": null,
"latestSupportedTlsVersion": "v1_2",
"encryptionCertificate": null,
"encryptionCertificateId": null,
"notificationUrlAppId": null
}

Here is my Post-Man call
164167-expiration-time.jpg

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,592 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,846 questions
{count} votes

Accepted answer
  1. Sheena-MSFT 1,721 Reputation points
    2022-01-12T18:10:13.673+00:00

    Hi @Amir Sohail ,

    Subsrciption's for users presence will expire every hour as mentioned here. It should renewed by extending its expiry time subscription-update

    Hope this helps

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Hunaid Hanfee-MSFT 976 Reputation points
    2022-01-13T09:26:24.857+00:00

    Thanks @Sheena-MSFT ,
    @Amir Sohail - It is also mention in Microsoft document that presence subscription maximum expiration time is only 1 hour. Please have a look at the doc - Maximum length of subscription per resource type.

    We have also raise a doc bug as well to make it available in v1.0 subscription's doc.

    Thanks,

    Hunaid L Hanfee


    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 comments No comments