Outlook rest api for on premises only setup
Asked Answered
C

2

6

I am trying to compare the usage of EWS vs Outlook REST Apis for an application that needs to connect to an on-prem exchange server. From what I understand, Exchange 2016 onwards supports REST Apis which are leveraged by Graph APIs as well internally when it determines that the mailbox is on-prem.

My question is, is there any way my application directly use the REST APIs to talk to the on-prem exchange, similar to EWS, if I dont need to support cloud \ hybrid setups?

For example, can I use https://my-on-prem-exchnagehost/api/v2.0/me/messages to connect to and talk to my-on-prem-exchnagehost?

All resources about the Outlook REST APIs talk about a hybrid deployment but non about on-prem only setups. My intention is to use one implementation for both on-prem and cloud where just the API endpoints change in the application, example https://my-on-prem-exchnagehost/api/v2.0/me/messages for on-prem and https://graph.microsoft.com/api/v2.0/me/messages for cloud.

Comparative answered 12/1, 2019 at 19:6 Comment(1)
FYI - All your links are deadBink
D
1

Yes, the REST APIs should be accessible on an on-prem server. Documentation here. Note that the Exchange REST API and the Graph APIs are different and it's not a drop-in replacement with the Graph's interface.

Dimpledimwit answered 14/1, 2019 at 18:34 Comment(2)
Thanks Richard. The article says "Applies to: Exchange Online | Office 365 | Hotmail.com | Live.com | MSN.com | Outlook.com | Passport.com" which has me confused. Also I do not find a good source which talks about how the authentication is done when using REST APIs with on-prem exchange.Comparative
The API shape is mostly the same between O365 and on-prem (Exchange 2019) so the docs should give you an idea of what's available. RE Auth: The administrator can set the authentication on the REST app pool however they wish. This could be basic auth or windows auth or anything else in between. Basic auth would be a simple start.Dimpledimwit
H
0

You should note that currently it is NOT supported to use the REST APIs in a pure on-premises environment. It may work (you can fire requests at the /Api endpoint and may get results), but if you hit any issues you are on your own. Until Microsoft announces support for on-premises (which at the time of posting has not happened; I am not aware of any plans to change this), then you should not use it.

Hanford answered 30/5, 2019 at 14:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.