What is Microsoft Graph API

In this tutorial, we will learn what is Microsoft Graph API? Also we will check out a few features and improvements in Microsoft graph explorer.

What is Microsoft Graph API

Microsoft graph is one of the excellent features in the Microsoft cloud environment. It provides many features to use in our application. We can simply call as Graph API and it is a Restful web API that we can use to communicate with Microsoft cloud other services.

Microsoft Graph provides a unified programmability model that you can use to access the tremendous amount of data in Office 365, Windows 10, and Enterprise Mobility + Security, with the entire Microsoft 365 platform.

We can get all APIS from Office 365 in a single endpoint called https://graph.microsoft.com.

There are common components that are included in this API. That we have to provide while calling this.

{HTTP method} https://graph.microsoft.com/{version}/{resource}?{query-parameters}
  • HTTP
  • Version
  • Resources
  • Query-Parameter

And after execution, it will give the response with include the below component.

  • Status code
  • Response message

Microsoft Graph API can able to access the data from below other Office 365 services.

  • Microsoft Team
  • Microsoft Azure Services
  • OneDrive
  • OneNote
  • Excel online
  • Outlook online
  • Planner
  • SharePoint
  • Microsoft Security
  • Microsoft Notification
  • Batching etc.
what is microsoft graph api

Read How to Authorize users to access GRAPH APIs with OAuth 2.0

In Real time Scenario where we are using this service ?

  • Suppose My client needs to show his outlook on new emails or meetings inside the SharePoint page. So here we can easily use Graph API to call outlook email and show in SharePoint Online.
  • Sometimes a client needs to see all users and groups inside the SharePoint. So here we can use this service to get all users and groups.

Below are the collection of Graph API which we are using in our application in daily basis.

Service NameURL
Get My profilehttps://graph.microsoft.com/v1.0/me/
Get Emailhttps://graph.microsoft.com/v1.0/me/messages
Create User (POST)
Get Users(GET)
Get all Planner Taskhttps://graph.microsoft.com/beta/me/planner/tasks
Get All item in My drivehttps://graph.microsoft.com/v1.0/me/drive/root/children
Get Members in Teamhttps://graph.microsoft.com/v1.0/groups/{group-id-for-teams}/members
Get my Calendarhttps://graph.microsoft.com/v1.0/me/calendars
Get User Recent activityhttps://graph.microsoft.com/v1.0/me/activities/recent
Send Message in teamhttps://graph.microsoft.com/beta/teams/{group-id-for-teams}/channels/{channel-id}/messages/{message-id}

We can also get more APIs in Microsoft explorer. Click on the below link to get all APIS.

microsoft graph api

These are the features that we can achieve when we use Graph API in SharePoint.

You may like following tutorials:

You can refer below Microsoft link to get more information about Microsoft Graph API and what are the new features which have added and removed from graph API.


Microsoft Graph Explorer Features and Improvements

Now we will see a few Microsoft graph explorer new improvements.

Microsoft recently releases a new version of graph explorer, which is available on the below link:

This is developed using the React/Redux framework and it is very easy to use for the developers.

Old Microsoft graph explorer

This is how the old Microsoft graph explorer looks like:

Microsoft graph explorer

New Microsoft graph explorer

The new Microsoft graph explorer looks like below:

Microsoft graph explorer features

If we look into the above images, there many changes has happens here.

Below are a few Microsoft Graph Explorer new improvements and new features.

1: Modify Permission

In the new graph explorer, the Permission tab is presently closed to Request Header at the top so that we can easily provide the permission when it required.

Graph explorer modify permission

2: Access Token

Microsoft has a newly added access token tab to secure our application. You can copy the access token to use in our application. It is added to this explorer.

Graph explorer modify access token

3: Adaptive Cards

Here you can see your result in a well format so that developer can understand it very easily.

Graph explorer modify adaptive cards

4: Code Snippets

Code Snippets is one of the good features which is added in the graph explorer. Here we can easily get all the API call code in different programming languages: C#, Java, JavaScript, and Objective C.

Graph explorer code snippets

5: Expand Response

Here you can expand the explorer to see the output in good format and separate window.

Graph explorer expand response

6: Sample Query

Now you will get all related sample queries in an order with a group by items so that you can easily search the query based on the topic.

Graph explorer sample query

I hope you enjoy this new version of Graph Explorer and we look forward to hearing your feedback.

In this tutorial, we learned what is Microsoft Graph API and a few new features and improvements in Microsoft Graph Explorer.

Related SharePoint tutorials: