Reputation: 395
I am trying to set up webhooks to update my apps database after a contact has been changed in Outlook. I want to manipulate the subscriptions I have set up in order to update them before they expire. At the moment I am doing a query to get the list of subscriptions I currently have, and the response I am getting is confusing.
I get an initial response, with a list of 154 subscriptions that have all expired (and my understanding is that they should not show up if they have expired.) as well as a nextLink. example (current date 4/9/19)
applicationId: "afa7c255-37b2-4cb1-af0e-bf7bad39ed98"
changeType: "updated"
clientState: null
creatorId: "7e47df1e-7f11-45ca-a89a-d63dc83fdfa6"
expirationDateTime: "2019-04-04T18:17:05.192Z"
id: "cd80f682-45d2-496c-9e96-b39656803787"
notificationUrl: "https://us-central1-batteries-fb.cloudfunctions.net/graphContactSubscription"
resource: "users/[email protected]/contacts"
I then preform another request following the nextLink, and I receive a list of 532 subscriptions that all have an expiration date that is a week from the current day. This is concerning because according to Microsoft docs (https://learn.microsoft.com/en-us/graph/api/resources/subscription?view=graph-rest-1.0) any request that passes the maximum length allowed should fail, and therefore never have been created. example (current date 4/9/19)
applicationId: "afa7c255-37b2-4cb1-af0e-bf7bad39ed98"
changeType: "updated"
clientState: null
creatorId: "7e47df1e-7f11-45ca-a89a-d63dc83fdfa6"
expirationDateTime: "2019-04-15T16:40:59.2650236Z"
id: "452c3780-3a87-4d75-a3db-079aa2e4d69c"
notificationUrl: "https://us-central1-batteries-fb.cloudfunctions.net/graphContactSubscription"
resource: "users/[email protected]/contacts"
Following the finding of these invalid subscriptions, I am attempting to delete them from my application, and I get an unusual response (which i believe has to do with Deleting Microsoft graph fails with ExtensionError)
{ code: 'ExtensionError',
message:
"Operation: Delete; Exception: [Status Code: NotFound; Reason: The subscription with Id 'QzAxODMzRTMtNzQ1Mi00OTIxLUExRjUtRTFDNjBGMTI1NTU0XzQ3RkYzQTg0LUY3OEUtNEI0Ni1BNjk3LUU4QTE4QjREREJERA==' is not found.]",
innerError:
{ 'request-id': 'dcc27bf9-2c38-4770-b743-2629a1e038fc',
date: '2019-04-09T17:49:21' } } }
This response looks very similar to the response in Microsoft Graph Subscription ExtensionError - Delete / Update question, except he never found a solution except waiting past their expiration date, which allowed him to continue on. My list of subscriptions are well past their expiration and still in my list.
Upvotes: 0
Views: 281
Reputation: 5342
As mentioned in the latest update of the question you pointed to, this was a temporary issue which got addressed.
Upvotes: 1