About: Office 365 REST APIs for Exchange


API Type:  Mailbox Assessor
API Interface: REST, JSON, OAuth v2 over HTTP
Business Logic: Works with content in mailboxes such as Mail, Calendar, Contacts
Development Languages: Anything which can send a post. So, you can write code for iOS, Droid, Windows forms, ASP.NET, JavaScript, PowerShell... 
Property Access:
Yes
Product Versions:
Exchange Online (Wave 15+) 

Summary:

The REST API basically allows any client which can send an SSL encrypted POST to be able to work with items in a mailbox in Exchange.  These APIs use REST/OData for data transport and OAuth and Basic for authentications and authorization.

Some Points Of Interest:

  • Can be used with any language.
  • Currently works only with Exchange Online and Exchange 2016 CU3+
  • Impersonation and delegation are currently not supported.
  • For Authentication only Basic and OAUth2 access tokens are supported currently.
  • You can use Visual Studio and the Office 365 Client libraries to build a quick and simple sample to use against Exchange.
  • There are a lot of APIs in the Office 365 REST APIs. The content on this blog is focused on the ones related to mailbox content.
  • If you don't see a feature you need from this API now then you should consider using EWS and checking later to see if the functionality has been implemented. Yes, this API is growing into something which is very robust.

Backgrounders:

Exchange Server development
https://msdn.microsoft.com/en-us/office/dn820100.aspx

Office 365 APIs platform overview
https://msdn.microsoft.com/en-us/office/office365/howto/platform-development-overview

Using the REST API
https://msdn.microsoft.com/en-us/library/office/dn659752.aspx

Office 365 API reference
https://msdn.microsoft.com/en-us/office/office365/api/api-catalog

Discovery Service REST API reference
https://msdn.microsoft.com/en-us/office/office365/api/discovery-service-rest-operations

API Tutorial for Outlook
https://store.office.com/en-us/app.aspx?assetid=WA104379630&ui=en-US&rs=en-US&ad=US&appredirect=false

Office 365 API code samples and videos
https://msdn.microsoft.com/en-us/office/office365/howto/starter-projects-and-code-samples

Using OAuth2 to access Calendar, Contact and Mail API in Office 365 Exchange Online
http://blogs.msdn.com/b/exchangedev/archive/2014/03/25/using-oauth2-to-access-calendar-contact-and-mail-api-in-exchange-online-in-office-365.aspx

Building Daemon or Service Apps with Office 365 Mail, Calendar, and Contacts APIs (OAuth2 client credential flow)
https://azure.microsoft.com/en-us/documentation/articles/active-directory-protocols-oauth-code/

Using OAuth2 to access Calendar, Contact and Mail API in Office 365 Exchange Online
https://blogs.msdn.microsoft.com/exchangedev/2014/03/25/using-oauth2-to-access-calendar-contact-and-mail-api-in-office-365-exchange-online/

Authorize access to web applications using OAuth 2.0 and Azure Active Directory
https://azure.microsoft.com/en-us/documentation/articles/active-directory-protocols-oauth-code/

User-Delegate access / Code Grant Flow
https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx

App-Only access / Client Credential Grant Flow
https://msdn.microsoft.com/en-us/library/azure/dn645543.aspx

Building Tenant-Wide Apps with the New Exchange REST APIs
https://channel9.msdn.com/events/Ignite/2015/BRK3145

Exchange REST APIs
https://channel9.msdn.com/events/Open-Specifications-Plugfests/Redmond-Interoperability-Protocols-Plugfest-2014/Exchange-REST-APIs

Integrating Mail and Calendar experiences within Office 365
https://channel9.msdn.com/events/SharePoint-Conference/2014/SPC379

Important Points and time locations. You can use these timings to forward the video right to where you need some quick info on a topic.

    • @ 17 minutes - talking about native apps verus web apps
    • @ 22 minutes - Basic authentication protocol flows
    • @ 27 minutes - protocol flows with OAuth
    • @ 33 minutes - native client apps
    • @ 53 minutes - What does the access token for Exchange look like

Deep Dive into the Office 365 Groups REST API
https://channel9.msdn.com/events/Build/2015/3-701

Exchange dev blog
http://blogs.msdn.com/b/exchangedev/
This is the blog for the developers who wrote the REST implementation for Exchange as well as for other parts of Exchange.

Azure AD Graph REST API Reference
https://msdn.microsoft.com/en-us/library/azure/hh974478.aspx
The Graph API is a RESTful service comprised of endpoints that are accessed using standard HTTP requests. The Graph API supports XML or Javascript Object Notation (JSON) content types for requests and responses.

OAuth2 in action with the release of Office 365 Calendar, Contacts and Mail
http://blogs.msdn.com/b/exchangedev/archive/2014/10/28/oauth2-in-action-with-the-release-of-office-365-calendar-contacts-and-mail.aspx

Outlook Notifications REST API reference (preview)
https://msdn.microsoft.com/office/office365/APi/notify-rest-operations

Zapier’s Office 365 API Journey
http://blogs.msdn.com/b/exchangedev/archive/2014/06/19/zapier-s-office-365-api-journey.aspx

Microsoft Office 365 API Tools for Visual Studio 2013
https://visualstudiogallery.msdn.microsoft.com/a15b85e6-69a7-4fdf-adda-a38066bb5155

Developing on non-Microsoft platforms and languages:

Microsoft Services SDKs for iOS Preview
https://github.com/OfficeDev/Office-365-SDK-for-iOS

Develop Office 365 REST API apps for Android
https://msdn.microsoft.com/en-us/office/office365/howto/develop-apps-for-android
There is no MS Developer support for this API.  However, help can be provided with the traffic over the wire to Exchange as it generates REST traffic.

Office 365 APIs and Node.js
http://blogs.msdn.com/b/exchangedev/archive/2015/03/12/office-365-apis-and-node-js.aspx

Using the Calendar API in PHP
http://blogs.msdn.com/b/exchangedev/archive/2015/02/26/using-the-calendar-api-in-php.aspx

Office 365 APIs and Python Part 1: OAuth2
http://blogs.msdn.com/b/exchangedev/archive/2015/01/05/office-365-apis-and-python-part-1-oauth2.aspx

Ruby on Rails and Office 365 Tutorial
http://blogs.msdn.com/b/exchangedev/archive/2015/02/12/ruby-on-rails-and-office-365-tutorial.aspx

Get started with Office 365 APIs in apps
https://msdn.microsoft.com/office/office365/HowTo/getting-started-Office-365-APIs

Another REST API - for Live:

Using the REST API
https://msdn.microsoft.com/en-us/library/office/dn659752.aspx
This is not for going against Exchange but rather for going against a Live account.

Samples:

Office 365 REST API sandbox
https://apisandbox.msdn.microsoft.com/
This lets you try REST calls.

Office 365 OAuth Sandbox
https://oauthplay.azurewebsites.net/
This lets you try oAuth calls.

Announcing C# Support in the API Sandbox for Office 365 APIs
http://blogs.msdn.com/b/exchangedev/archive/2015/02/24/announcing-c-support-in-the-api-sandbox-for-office-365-apis.aspx

API Tutorial for Outlook
https://store.office.com/en-us/app.aspx?assetid=WA104379630&ui=en-US&rs=en-US&ad=US&appredirect=false

Graph API Explorer
https://graphexplorer2.azurewebsites.net/

MS GIT Samples
https://github.com/OfficeDev

Ruby gem for Mail, Calendar, and Contacts APIs
http://blogs.msdn.com/b/exchangedev/archive/2015/03/24/ruby-gem-for-mail-calendar-and-contacts-apis.aspx

Office 365 API code samples and videos
https://msdn.microsoft.com/en-us/office/office365/howto/starter-projects-and-code-samples

Public Specifications:

OAuth 2.0 Spec
http://tools.ietf.org/html/rfc6749

OpenID 1.0 Spec
http://openid.net/specs/openid-connect-core-1_0.html

OData 4.0 Spec
http://www.odata.org/documentation/

Where to ask for help:

Customer Feedback for the Office Developer Platform
http://officespdev.uservoice.com/

stackoverflow - questions on Microsoft Office 365 APIs
http://stackoverflow.com/questions/tagged/office365

Exchange 2016 CU3+:

On-Premises Architectural Requirements for the REST API https://blogs.technet.microsoft.com/exchange/2016/09/26/on-premises-architectural-requirements-for-the-rest-api/

Cumulative Update 3 for Exchange Server 2016 (KB3152589)
https://www.microsoft.com/en-us/download/details.aspx?id=53837

Exchange 2016 CU3 Released
https://blogs.technet.microsoft.com/rmilne/2016/09/20/exchange-2016-cu3-released/

Also see:

Exchange and Outlook Development Help
http://blogs.msdn.com/b/webdav_101/archive/2015/05/28/exchange-and-outlook-development-help.aspx

About: Mailbox Accessing APIs
http://blogs.msdn.com/b/webdav_101/archive/2015/05/28/about-mailbox-accessing-apis.aspx

Comments (1)

  1. vijay says:

    Hi,

    i would be glad if Microsoft provides framework to restore exchange mail items form backup, the only that i know of is mount the edb as recovery database and restore a folder/mailbox to active mailbox. there is no provision to restore a  single mail from the database. it would be  great if same rest API can take recovery data base as input for such functionality.

Skip to main content