Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user’s mailbox.
Last modified: June 12, 2014
Applicable Outlook modes
Compose or read
Available in requirement sets
The makeEwsRequestAsync method sends an EWS request to Exchange Online, Exchange Online as part of Office 365, or a version of Exchange starting with Exchange 2013 that hosts the user’s mailbox. When the request is complete, the method specified by the callback parameter is called with one parameter, the result object. The result object has two properties: the context property contains the data in the userContext parameter, and the value property contains the XML result of the EWS request. If the result exceeds 1 MB in size, an error message is returned instead.
You cannot request Folder Associated Items with the makeEwsRequestAsync method.
The XML request must specify UTF-8 encoding.
Your mail app must have the ReadWriteMailbox permission to use the makeEwsRequestAsync method. For information about using the ReadWriteMailbox permission and the EWS operations that you can call with the makeEwsRequestAsync method, see Specify permissions for mail app access to the user's mailbox.
The server administrator must set "OAuthAuthentication" to true on the Client Access Server EWS directory to enable the makeEwsRequestAsync method to make EWS requests.
When you use the makeEwsRequestAsync method in mail apps running in Outlook versions earlier than version 15.0.4535.1004, you should set the encoding value to ISO-8859-1.
You do not need to set the encoding value when your mail app is running in Outlook Web App. You can determine whether your mail app is running in Outlook or Outlook Web App by using the mailbox.diagnostics.hostName property. You can determine what version of Outlook is running by using the mailbox.diagnostics.hostVersion property.