8

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

Sandman
  • 2,577
  • 2
  • 21
  • 32

2 Answers2

11

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 
sapl
  • 343
  • 3
  • 7
  • 2
    I am a bit confused.. I remember i've seen this page in the past and from this discussion: Geoff: "What about Exchange 2016 on-prem only deployments? You seem to be saying that this functionality is only available in hybrid configurations." Ross: "That is correct" i understand there must be some kind of a hybrid configuration in place for this to work? Yet you are saying it works in a Non-Hybrid configuration.. I guess this is something new that comes with CU3? – Sandman Feb 14 '18 at 18:42
7

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.

Eric Legault
  • 5,706
  • 2
  • 22
  • 38
  • In such a hybrid setup, who can respond to the REST request? Can the on-prem server do it or do the REST requests have to be made via the Internet? Thanks – Sandman Feb 25 '17 at 10:23
  • I'm not sure I understand your question; the server is always responsible for responding to REST requests, which can come from a client or web server. – Eric Legault Feb 25 '17 at 22:11
  • Sorry i guess i didn't explain too well... It's unclear to me: in a hybrid setup with Exchange on-prem combined with Exchange Online (i understand such a setup is possible) who can actually respond to the REST request, and if the response can also come from the on-prem Exchange server in this hybrid setup. But it's not so important, i think i will have to learn more about how this hybrid setup actually works and then it will probably be clearer. – Sandman Mar 04 '17 at 12:16
  • Update: The REST API is supported in On-Premise-Scenarios beginning from Exchange 2016 CU3. (Source - https://techcommunity.microsoft.com/t5/exchange-team-blog/on-premises-architectural-requirements-for-the-rest-api/ba-p/605609) – Swamy Aug 13 '20 at 08:50
  • Outlook Rest API support is being sunset in March 2023: https://techcommunity.microsoft.com/t5/exchange-team-blog/the-end-of-the-rest-api-for-on-premises-mailboxes-preview/ba-p/3221219, at least for on-premise installs. – JeremyP Sep 14 '22 at 15:16