Search code examples
javascriptexchange-serverews-javascript-api

Network side updates to exchange personal address book


I'm using @gautamsi ews-javascript-api to get my personal address book contacts programatically in my React/Redux app. I can fetch my contacts using FindItems, but when I push a function to the OnChange array for an item, it never gets called when I update that contact from the outlook web interface.

First question, is it even possible to have a function called in my app when a contact is changed from network side?

Second question,

item.OnChange.push(function(data) { console.log(data) } );

Is this how I register a function to be called when item is changed on the network side.

Finally, is there a place I can register a callback to be notified whenever a contact is added or removed to my personal address book on the network side?

Cheers


Solution

  • Got a response from the author of this API and thought I'd answer it here for everyone else.

    OnChange functions are only called for local changes to objects. There isn't a way to get notified of network side changes to your objects.