Warning
The Outlook REST API was retired on November 30, 2022. Use Microsoft Graph to develop new applications. For details, see Microsoft’s deprecation notice.
This article is kept as a record of how the Outlook REST API and Office365APIEditor were used at the time of writing. The API and tools described below are no longer available in the current environment.
The easiest way to try the Outlook REST API was to use Outlook Sandbox. However, you could not use your own Client ID or application permissions with it. Outlook Sandbox was also scheduled to be retired by the end of 2020. This article therefore explains how to test the Outlook REST API with Office365APIEditor. It covers retrieving email only, but you could use other permissions in the same way to access various types of information. You could capture Office365APIEditor traffic with Fiddler to see what requests were being made. To develop an application that used the Outlook REST API, you would implement these requests in a programming language. A method for using application permissions had previously been included, but it was removed because new applications could no longer try it after the Outlook REST API deprecation was announced.
Try delegated permissions with Office365APIEditor (built-in application)
| Item | Value |
|---|---|
| Access token type | Delegated Token |
| Tool | Office365APIEditor |
| Authentication endpoint | v2.0 |
| API | Outlook REST API |
- Install and start Office365APIEditor.
- Click [Tools] - [New Editor].
- Click [File] - [New Access Token].
- Select [I have not registered the application.] and click [Next].
- Select [Office365APIEditor built-in application] and click [Next].
- Click [Scope editor].
- Click [Deselect all].
- Select
https://outlook.office.com/mail.read. - Click [OK].
- Click [Next].
- Sign in with an Office 365 account.
- Enter
https://outlook.office.com/api/v2.0/me/messagesin [Request] in the upper pane and click [Run]. - The signed-in user’s email appears in [Body] in the lower pane.
Try delegated permissions with Office365APIEditor (custom application)
| Item | Value |
|---|---|
| Access token type | Delegated Token |
| Tool | Office365APIEditor |
| Authentication endpoint | v2.0 |
| API | Outlook REST API |
- Sign in to the Azure portal.
- Click [Active Directory] - [App registrations] - [New registration].
- Enter an application name in [Name] (for example, App03).
- Under [Supported account types], select [Accounts in this organizational directory only].
- Under [Redirect URI], select [Public client (mobile & desktop)] and enter a URI of your choice (for example,
https://localhost/App03). - Click [Register].
- Make a note of the displayed [Application (client) ID].
- Install and start Office365APIEditor.
- Click [Tools] - [New Editor].
- Click [File] - [New Access Token].
- Select [v2.0 Endpoint] and click [Next].
- Select [Public client/native (mobile & desktop) app] and click [Next].
- Under [Tenant Name], enter the onmicrosoft.com domain name of the tenant where you registered the application (for example,
contoso.onmicrosoft.com). - Under [Application ID], enter the value you noted in step 7.
- Under [Redirect URI], enter the URI you entered in step 5.
- Click [Scope editor].
- Click [Deselect all].
- Select
https://outlook.office.com/mail.read. - Click [OK].
- Click [Next].
- Sign in with an Office 365 account.
- Enter
https://outlook.office.com/api/v2.0/me/messagesin [Request] in the upper pane and click [Run]. - The signed-in user’s email appears in [Body] in the lower pane.