How you can LikeUnlike an Merchandise utilizing EWS in Trade On-line Likes and Mentions are a brand new function in Trade On-line (in OWA) that was launched late final 12 months in First Launch for Workplace365. With the targeted Inbox now being rolled out to interchange litter these are a number of the new social consumer curation kind options that might change the consumer expertise (hopefully for the higher) within the coming years. Whereas none of those options are new to these individuals utilizing different Social platforms like fb, twitter and many others they do supply a world of recent prospects to people who have just a little creativeness.
On this submit I am going to take a look at how one can Like an merchandise utilizing Trade Internet Providers eg
At present there is no such thing as a actual documentation on the usage of Likes in any API or how they’re delivered in Trade On-line so care ought to be taken as this could imply the function is topic to vary in any of the longer term service updates.
Versioning your Requests
To make use of likes absolutely you could be sure you model your EWS requests (which includes setting the ServerRequestVersion within the SOAP header) to V2015_10_05 or increased. The Like info is returned by Trade as a Strongly Sort property in EWS (LikeType). Should you take a look at a Response that features the Like info within the SOAP response it is best to see each Like and LikePreview returned eg
When you’ve got the most recent proxy objects from the Trade On-line WSDL then it is best to see the Likes and LikePreview property collections in the ItemType Class. Within the newest EWS Managed API from github https://github.com/OfficeDev/ews-managed-api solely the Likes class is presently out there.
Liking an Merchandise (Unsupported)
The EWS LikeItem operation presently has no definition within the Providers.WSDL so liking an Merchandise through EWS is presently unsupported. Nonetheless you may nonetheless use the operation so long as you assemble the request utilizing Uncooked SOAP message eg a request to like or in contrast to and merchandise utilizing EWS seem like
<?xml model="1.0" encoding="utf-8"?>
<cleaning soap:Envelope xmlns:cleaning soap="http://schemas.xmlsoap.org/soap/envelope/"
<cleaning soap:Physique xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<ItemId Id="AAM.." ChangeKey="CQA.."/>
As that is an unsupported operation if you happen to do one thing like attempt to like the identical merchandise twice you’ll get a 500 error somewhat then a pleasant SOAP based mostly error response. I’ve put collectively a scrip that means that you can seek for an Merchandise through topic and like or in contrast to it utilizing EWS. I’ve put this up on GitHub right here https://github.com/gscales/Powershell-Scripts/blob/grasp/EWSLIkeMessage.ps1