Does Exchange Server (in-house) suppport REST API?

Sandman picture Sandman · Feb 23, 2017 · Viewed 12.7k times · Source

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...

Answer

sapl picture sapl · Jul 4, 2017

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