7
votes

This document that applies to Exchange Server suggests that the bulk of API / Web Services is SOAP based: https://msdn.microsoft.com/en-us/library/office/dd877012(v=exchg.150).aspx

However i see that Office 365 (which i assume is cloud based) supports a REST API. https://msdn.microsoft.com/en-us/library/office/dn776319(v=exchg.150).aspx

But there it says that this documentation applies to Exchange Online / Office 365 only. So if i have an in-house Exchange Server, will it also support REST? Is there some official docu to this end? (i know that it supports EWS via SOAP, but i would prefer REST, and what i found online was just bits and pieces of stories and experiments)

Many thanks...

2

2 Answers

7
votes

The only REST API exposed by Exchange on-prem is for accessing user photos. All of the other REST APIs are meant for Exchange Online only, meaning in the context of an Office 365 tenant.

10
votes

Regarding to the Exchange Team Blog, the REST API is also supported in On-Premise-Scenarios beginning from Exchange 2016 CU3.

Please see https://blogs.technet.microsoft.com/exchange/2016/09/26/on-premises-architectural-requirements-for-the-rest-api/ for reference. I've tested it with our Exchange 2016 CU5 (Non-Hybrid)-Deployment and it worked well.

You can for example query the mails from your account via the following PowerShell-Code:

$restdata = Invoke-RestMethod -Uri "https://YOUR-Exchange-Server/api/v2.0/me/messages" -Credential (Get-Credential)
$restdata.value