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

倾然丶 夕夏残阳落幕 提交于 2019-12-04 12:14:17

问题


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


回答1:


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.




回答2:


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 


来源:https://stackoverflow.com/questions/42413743/does-exchange-server-in-house-suppport-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!