Noticed that I am receiving multiple notifications when a calendar event is created or updated. For example, I created an event on Outlook calendar web client and invited some attendees. I received one notification with changeType as "created", followed by 4 notifications with changeType as "updated". What is the logic behind the notifications? There were no updates made to this event. All the notifications came within 1 or 2 seconds after the first "created" notification.
The number of notifications depends on the number of objects your event action affects. For example creating a new meeting results in an update of the calendar folder object. Remember that you are not subscribed only to the event but the calendar, so your requirement from the API maybe a subset of what the API does
IMHO it is a redundant feature carried forward from EWS
Related
We are migrating over from Outlook API that is deprecated to Microsoft Graph API. We have a working flow where we are subscribed to a user's contacts changed/created/deleted events.
I created a subscription and got back a 201 response and the following:
{"#odata.context":"https://graph.microsoft.com/beta/$metadata#subscriptions/$entity",
"id":"xxxxxxx",
"resource":"me/contactFolders/YYYYYYYYYYY/contacts",
"applicationId":"ZZZZZZZZZZZZ",
"changeType":"created,updated,deleted",
"clientState":null,
"notificationUrl":"https://xxxxxxx.com/xxxxxxx",
"notificationQueryOptions":null,
"notificationContentType":"application/json",
"lifecycleNotificationUrl":null,
"expirationDateTime":"2022-05-21T17:05:09Z",
"creatorId":"444444444444",
"includeResourceData":null,
"latestSupportedTlsVersion":"v1_2",
"encryptionCertificate":null,
"encryptionCertificateId":null,
"notificationUrlAppId":null}
However, I've tried to subscribe to just "me/contacts" instead of a specific folder as well but no matter what I do, my notification URL does not receive any notifications. I have subscriptions for email messages and that one works fine. Is there something that is different with receiving notifications from the old Outlook API vs Microsoft Graph's subscription notification?
I created a subscription to my Outlook calendar using the Microsoft graph SDK.
When I accept an event in Outlook, Outlook sends my server 3 notifications in succession:
Event Updated
Event Delete
Event Created
As far as I can tell, this means Outlook is:
Registering that the event has changed
Deleting the current instance of the event
Creating a brand new accepted event (with the same ICalUId as the deleted event)
When I look at the notifications sent by Outlook, the first two notifications (update and delete) have the same event id but the create notification has a different event id.
Is there any way to differentiate between the delete notification coming from this batch of notifications (after someone clicks "Accept") and the delete notification sent to me when an event is actually declined/removed from Outlook?
NOTE- Currently I am storing the iCalUId for the event in my database and when I receive a deleted notification, I get the iCalUId for the event and check Outlook to see if an event with the same ICalUId exists. If there is an event, I update my db and don't delete the event. However, this morning I noticed that it took Outlook nearly 10 seconds to go from steps 2 to 3 (deleting the instance to creating a new instance).
More specifically, I received the deleted notification, checked Outlook to see if an event with the same ICalUId was there and there was none. 10 seconds later (after I deleted the event from my db) I received an event created notification.
The only potential work-around I can think of is to continue checking for the event in Outlook for a period of time (30 seconds?).
I have application who is getting notifications from Outlook, it is subscribed for update,create changes in users mailboxes. I am getting notifications all day long even if the users are not active (It is their sleep time). Can I know how notifications are sent to me?
There are all sorts of background tasks (assistants), both time based and event based that wake up and do work on the system. In addition, there may be apps that the user has given permissions to operate on their mailbox that may be doing something behind the scenes. Exchange doesn't differentiate. When a change is made that matches the criteria in the subscription, a notification will be generated.
I followed the Outlook push notification documentation to subscribe for calendar notifications. And I am able to receive push notification whenever calendar item is changed or deleted. Now I want to receive push notification only when specific properties(example: To, Start time and End time properties) of calendar item are updated or calendar item itself is deleted.
Is there any API available to implement above scenario?
This isn't supported, the hooks are scoped at the object level (event, user, etc). You cannot subscribe to an individual property.
I have a rails app using Google calendar API with push notifications for each calendar the user shares with my app.
when user updates an event from app, it creates an updatedEvent request to API.
because the calendar is listed to push notification, it pushes a notification about some update to the calendar events (the same event of course ).
am i missing an attribute that can silent the notify?
when i get notify about changes and get the changed items from response, i compare the etag of the event with the one that i get from the API response so i manged to avoid another update.
but it's still an unnecessary update.