Microsoft Graph

What is Microsoft Graph?

Microsoft Graph exposes REST APIs and client libraries to access data on the following Microsoft 365 services:

  • Office 365 services: Delve, Excel, Microsoft Bookings, Microsoft Teams, OneDrive, OneNote, Outlook/Exchange, Planner, and SharePoint
  • Enterprise Mobility and Security services: Advanced Threat Analytics, Advanced Threat Protection, Azure Active Directory, Identity Manager, and Intune
  • Windows 10 services: activities, devices, notifications
  • Dynamics 365 Business Central

What Is Microsoft Graph Explorer?

Microsoft Graph Explorer is a web-based tool that helps you build and test queries in order to interact with Microsoft resources. So, in this post, I will use it to manage data. You can access to Microsoft Graph Explorer from this link:

Microsoft Graph Explorer

The first thing you need to do is to sign in with your account in order to access your own data. If you use Graph Explorer without your account, you will use the demo data. So click “Sign in with Microsoft”.

Sign in with Microsoft

The following part allows you to interact with your Microsoft resources. It can be divided in three parts:

Run Query

First, you can choose the action you want to perform:

Choose the action you want to perform

  • GET: Read data from a resource.
  • POST: Create a new resource or perform an action.
  • PUT: Replace a resource with a new one.
  • PATCH: Update a resource with new values.
  • DELETE: Remove a resource.

Next, you can select the API version you want to use:

Select the API version

  • V1.0 : Includes generally APIs. You can use this version for all production apps.
  • Beta : Includes APIs that are currently in preview. Microsoft recommends to not use beta APIs in production.

Then, there is the resource field which always starts with: This field allows you to insert the resource you want to manage. Below is the link that will be used:

  • Graph link + API version + Resource link

For instance, the full resource link could be:

The following textbox allows you to enter the new value to create or the date you want to update.

Textbox allows you to enter the new value

The following textbox will display data or error messages:

Textbox will display data or error message

Let’s start by running the following query to display your information:

Graph Explorer

You can use sample queries on the left side by clicking “show more samples”, then turn on/turn off the sample categories you want to use:

Sample queries

Sometimes you can see the following error message:

Error message

This error means that you need specific permissions in order to use this query. Let’s see how to manage these permissions.

The first step is to check the documentation page to identify the permissions you have to allow. In my case, I want to read my OneNote notebooks:


The second step is to click “modify your permissions” in the error message in order to enable the permissions:

Modify permissions

After applying the permissions, you need to log in again to refresh the permissions in Graph Explorer. Run the query to confirm that you can access your OneNote notebooks:

OneNote notebooks

Copy the OneNote Notebook ID in order to create a new section:

  1. Select the POST action, because we want to create a resource
  2. Paste the following link:<ID>/sections and modify the ID
  3. Enter the name of the new section that will be created in the “Request Body” textbox.

Request Body

Let’s check my OneNote and confirm that a new section named “Section from MS graph Explorer” is visible:

Section from MS graph Explorer

VSAN from StarWind is software-defined storage (SDS) solution created with restricted budgets and maximum output in mind. It pulls close to 100% of IOPS from existing hardware, ensures high uptime and fault tolerance starting with just two nodes. StarWind VSAN is hypervisor and hardware agnostic, allowing you to forget about hardware restrictions and crazy expensive physical shared storage.

Build your infrastructure with off-the-shelf hardware, scale however you like, increase return on investment (ROI) and enjoy Enterprise-grade virtualization features and benefits at SMB price today!


Thanks to the Graph API, we can very easily interact with the Microsoft resources. In this guide, I worked with OneNote, but a useful use case could be to interact with Microsoft Teams in order to create a new Teams/Channel, to add a member, and so on …

To finish, you can of course interact with the Graph API from your code as described on the following picture:

 Graph API

Back to blog