At the Technical Summit 2016, Siggi Jagott revealed that the REST Api will also be available for local (on-premises) Exchange servers:
Markus read the article and drew my attention to a comment on the Exchange Team blog:
On-Premises Architectural Requirements for the REST API
The article on the Exchange Team Blog explains, among other things, that Exchange 2016 CU3 in hybrid mode is required for the REST Api. In plain language: No REST Api without Cloud. This is also confirmed by Markus in the comments.
Interesting coincidence: I was just about to upgrade my test environment to Exchange 2016 CU4 and stumbled across the following virtual directory in IIS:
If you take a look at the following link, you will quickly see a "certain similarity"
Get Started with Mail, Calendar, and Contacts REST APIs
Looks like the REST Api is already there? I thought I'd just give it a try.
I used a small PowerShell script for the test:
$creds = get-credential $url = "https://outlook.frankysweb.com/api/v2.0/me/messages" $request = invoke-webrequest $url -Credential $creds $answer = $request.content | ConvertFrom-Json
I first entered the administrator's login information:
The script runs without errors:
And the answer looks promising:
The Api even provides a whole lot of data:
This makes it easy to browse through the data:
For comparison, this is what the mailbox looks like in OWA:
In the data output via REST Api, however, you can see several mails, while only one mail is visible in the OWA inbox. My little script has simply fetched all the emails as I have not filtered any further, hence the sent emails:
I tried it with Exchange 2016 CU3 in the test environment, which has never seen the Hybrid Configuration Wizard, let alone Hybrid Mode. The test environment doesn't even have an internet connection.
So you could definitely say: You can't get any more on-premises than this! Nevertheless, the REST Api seems to work. Are there perhaps no plans to publish the REST Api for local Exchange servers because it has already been there for a long time?
Incidentally, it also works with Exchange 2016 CU4, I couldn't find any other versions in a hurry.
I'll play a bit more and then write a more detailed article on the subject.
Kleines Update: Die direkte Nutzung der API ist nicht supportet. Microsoft nutzt diesen Zugang, wenn man im Hybrid-Mode gegen graph.microsoft.com geht und OnPremise informationen abruft. Eigentlich sollte „Basic Auth“ nicht gehen sondern nur OAUTH-Tokens und die kann man in einer reinen OnPrem Umgebung nicht generieren.
Also besser nicht darauf eigenen Code aufsetzen.
OnPrem -> Bleibt bei EWS
Cloud/Hybrud -> Graph
Supercool! Vielen Dank dafür!
Genial!!!
Danke für den Tipp.
Hi Frank,
vielen Dank für diesen Artikel.
Wird sofort ausprobiert :-)
Viele Grüße,
Markus