问题
I followed the steps described in Microsoft Graph Webhooks Sample for Node.js to subscribe to the changes in events, i.e. to get notified if an event is created, updated or deleted. Those are working fine.
My constant.js file is as follows
exports.subscriptionConfiguration = {
changeType: 'Created,updated,deleted',
notificationUrl: 'https://my_ngrok_id.ngrok.io/listen',
resource: 'me/events',
clientState: 'cLIENTsTATEfORvALIDATION'
};
What I really want to do is to subscribe to changes in event fields so that I can immediately update those fields in my Addin.
Is there anyway to get notified of the changes made to fields like title, attendees, location etc in outlook event at the very instant a change is made?
For example, what I expect is a similar functionality of the addin Find Time. In this addin you can see, if an attendee is added or removed, the attendee in the addin also gets updated right after the change is made. I want similar functionality for all the fields in event creation page. I would also like to know whether such an implementation is possible right now?
回答1:
Can you please change the DefaultMinVersion to 1.7 in the manifest.xml file.
<Requirements>
<bt:Sets DefaultMinVersion="1.7">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
Also make sure that you change to new outlook(modern).
Then try to register events using addHandlerAsync
within the Office.initialize
.
https://docs.microsoft.com/en-us/office/dev/add-ins/reference/objectmodel/requirement-set-1.7/office.context.mailbox.item#addhandlerasynceventtype-handler-options-callback
Currently it supports Office.EventType.AppointmentTimeChanged
, Office.EventType.RecipientsChanged
, and Office.EventType.RecurrenceChanged
.
回答2:
Notifications in Outlook/Exchange are raised on the item / items collection / folder / folders collection / store level. Changes on the item's property level are not tracked - it is your responsibility (upon receiving an item level event) to extract the relevant (to you) fields and figure out if they have changed.
来源:https://stackoverflow.com/questions/57145939/subscribe-to-changes-in-outlook-calendar-event-fields