Warning
The official Office365APIEditor repository was archived on April 3, 2025, and all releases were removed. The official repository points to Graph Editor as its successor. The steps below reflect the environment at the time of writing and may not work as described today.
Graph Explorer is an easy way to try Microsoft Graph. However, the Microsoft Graph reports API, which provides Microsoft 365 reports, does not return results correctly in Graph Explorer. The API response is a 302 redirect, which Graph Explorer does not handle correctly. This article shows how to test the reports API with Office365APIEditor. The example uses getEmailActivityUserDetail, but you can retrieve other reports in the same way.
For general instructions on trying Microsoft Graph, see Getting started with Microsoft Graph.
Try delegated permissions (built-in application)
| Item | Value |
|---|---|
| Access token type | Delegated token |
| Tool | Office365APIEditor |
| Authentication endpoint | v2.0 |
| API | Microsoft Graph |
In addition to obtaining an access token, the user performing the operation must have an administrator role, such as Global Administrator. For details, see Authorization for APIs to read Microsoft 365 usage reports.
Install and start Office365APIEditor.
Select [Tools] - [New Editor].
Select [File] - [New Access Token].
Select [I have not registered the application.] and select [Next].
Select [Office365APIEditor built-in application] and select [Next].
Select [Scope editor].
Select [Deselect all].
Select
https://graph.microsoft.com/Reports.Read.Allfrom the list, then select [OK].Select [Next].
Sign in as an Office 365 administrator.
Select [Tools] - [Option].
On the [General] tab, turn on [Allow auto redirect], then select [OK].
Enter the following URL in [Request] in the upper pane, then select [Run].
1
https://graph.microsoft.com/v1.0/reports/getEmailActivityUserDetail(period='D7')
The report appears in [CSV] in the lower pane. To save it to a file, select [Save this CSV file].
Try delegated permissions (custom application)
| Item | Value |
|---|---|
| Access token type | Delegated token |
| Tool | Office365APIEditor |
| Authentication endpoint | v2.0 |
| API | Microsoft Graph |
In addition to obtaining an access token, the user performing the operation must have an administrator role, such as Global Administrator. For details, see Authorization for APIs to read Microsoft 365 usage reports.
Sign in to the Azure portal.
Select [Active Directory] - [App registrations] - [New registration].
Enter any application name in [Name] (for example,
App01).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/App01).Select [Register].
Make a note of the displayed [Application (client) ID].
Select [Manage] - [API permissions].
Install and start Office365APIEditor.
Select [Tools] - [New Editor].
Select [File] - [New Access Token].
Select [v2.0 Endpoint] and select [Next].
Select [Public client/native (mobile & desktop) app] and select [Next].
In [Tenant Name], enter the
onmicrosoft.comdomain name of the tenant where you registered the application (for example,contoso.onmicrosoft.com).In [Application ID], enter the value you noted in step 7.
In [Redirect URI], enter the URI you entered in step 5.
Select [Scope editor].
Select [Deselect all].
Select
https://graph.microsoft.com/Reports.Read.Allfrom the list, then select [OK].Select [Next].
Sign in as an Office 365 administrator.
Select [Tools] - [Option].
On the [General] tab, turn on [Allow auto redirect], then select [OK].
Enter the following URL in [Request] in the upper pane, then select [Run].
1
https://graph.microsoft.com/v1.0/reports/getEmailActivityUserDetail(period='D7')
The report appears in [CSV] in the lower pane. To save it to a file, select [Save this CSV file].
Try application permissions
| Item | Value |
|---|---|
| Access token type | App-Only token |
| Tool | Office365APIEditor |
| Authentication endpoint | v2.0 |
| API | Microsoft Graph |
Sign in to the Azure portal as an Office 365 administrator.
Select [Active Directory] - [App registrations] - [New registration].
Enter any application name in [Name] (for example,
App02).Under [Supported account types], select [Accounts in this organizational directory only].
Under [Redirect URI], select [Web] and enter a URI of your choice (for example,
https://localhost/App02).Select [Register].
Make a note of the displayed [Application (client) ID].
Select [Manage] - [Certificates & secrets] - [Client secrets].
Select [New client secret].
Enter any description in [Description] (for example,
Key1).Under [Expires], select an expiration period of your choice (for example, the recommended six months).
Select [Add].
Make a note of the displayed client secret value.
Select [Manage] - [API permissions].
Select [Add a permission].
Select [Microsoft Graph].
Select [Application permissions].
Select [Reports] - [Reports.Read.All].
Select [Add permissions].
Select [Grant admin consent for
]. Select [Yes].
Install and start Office365APIEditor.
Select [Tools] - [New Editor].
Select [File] - [New Access Token].
Select [v2.0 Endpoint] and select [Next].
Select [Web app (Use App Only Token by client secret for Microsoft Graph)] and select [Next].
In [Tenant Name], enter the
onmicrosoft.comdomain name of the tenant where you registered the application (for example,contoso.onmicrosoft.com).In [Application ID], enter the value you noted in step 7.
In [Password], enter the value you noted in step 13.
Select [Next].
Select [Tools] - [Option].
On the [General] tab, turn on [Allow auto redirect], then select [OK].
Enter the following URL in [Request] in the upper pane, then select [Run].
1
https://graph.microsoft.com/v1.0/reports/getEmailActivityUserDetail(period='D7')
The report appears in [CSV] in the lower pane. To save it to a file, select [Save this CSV file].