Office 365 – Microsoft Graph and Graph Explorer
Hi All,
Recently I got a chance to work on Office 365 groups. Requirement is I need to list all groups to those I belong to (current user groups). So here Microsoft Graph comes to picture. Here I’ll discuss Microsoft Graph, Microsoft Graph APIs, Graph Explorer.
What is Microsoft Graph?
Microsoft Graph provides APIs for developers to access data across Microsoft cloud.
Its built on the top of Office 365. Previously Microsoft Graph is known as Office 365 unified API.
Microsoft Graph exposes APIs, data across Office 365 and Azure AD. We can query to Users, Groups, Mail, Calendars, OneDrive, Azure Active Directory, OneNote, Planner, and so on.
Microsoft Graph exposes RESTFul services.
It provide single endpoint : https://graph.microsoft.com to communicate with different Office 365 cloud services like SharePoint Online, Planner, Yammer, Office 365 Groups, Office 365 Users etc.
Currently Microsoft Graph API v1.0 is stable version available and beta also available.
For details what we can do with Microsoft Graph please have a look at examples given- https://developer.microsoft.com/en-us/graph/examples
To read or write cloud service resource such as User, Email, Office 365 Group and so on we need to create the request as
https://graph.microsoft.com/{version}/{resource}?query-parameters where
{version}: Graph API version. Current version is 1.0.
{resource}: Like User, Email, Office 365 Group and so on.
query-parameters: Optional parameter to filter the response. For more details on query-parameters please have a look once https://developer.microsoft.com/en-us/graph/docs/concepts/query_parameters
What is Microsoft Graph Explorer?
Microsoft Graph Explorer is a tool to test the Microsoft Graph Queries. We can access Microsoft Graph Explorer with URL – https://developer.microsoft.com/en-us/graph/graph-explorer .
We need to sign in with our Office 365 account to test our queries. By default, it uses sample account. We need to sign in with Microsoft account from option available at left side as

Figure 1: Office 365 – Graph Explorer – “Sign in with Microsoft”
Once we are signed, we are ready to execute the queries.
This tool contains many sample queries to start as

Figure 2: Office 365 – Graph Explorer – Sample Queries
This tool also contains the history of our queries which we executed as

Figure 3: Office 365 – Graph Explorer – History of our queries
Executing the queries: Once we have authenticated with our Office 365 credentials, we are ready to execute the queries as

Figure 4: Office 365 – Graph Explorer – Executing queries
Here, /me/ is alias for current user. So, in response we will get details of current user as

Figure 5 : Office 365 – Graph Explorer – Query response
We could also set the permissions like against which Office 365 services we can execute queries as

Figure 6: Office 365 – Graph Explorer – “modifying permissions” link to update the permissions
As we click on “modify permissions” link, “Modify Permissions” dialog appears as

Figure 7: Office 365 – Graph Explorer – Modify Permissions dialog
There are many more options to explore here, Now I’ll stop here. I would say explore Graph Explorer, this is very handy tool.
References:
https://developer.microsoft.com/en-us/graph
https://developer.microsoft.com/en-us/graph/docs/concepts/overview
https://www.sharepointeurope.com/introduction-microsoft-graph-development-part-1/
https://developer.microsoft.com/en-us/graph/docs/concepts/permissions_reference
Thanks for reading 🙂
Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more. If you have any suggestion / feedback / doubt, you are most welcome.
Stay tuned on Knowledge-Junction, will come up with more such articles / news.
7 Responses
[…] One of the previous article “Office 365 – Microsoft Graph and Graph Explorer” we have discussed basics about Microsoft Graph and Graph Explorer. Since then also lots of […]
[…] Office 365 – Microsoft Graph and Graph Explorer […]
[…] Office 365 – Microsoft Graph and Graph Explorer […]
[…] Office 365 – Microsoft Graph and Graph Explorer […]
[…] you missed the previous articles in this series, here is the list, please have a look once. Office 365 – Microsoft Graph and Graph ExplorerOffice 365 – Azure Active Directory – Registering/Creating new Azure App – detailed […]
[…] Office 365 – Microsoft Graph and Graph ExplorerOffice 365 – Azure Active Directory – Registering/Creating new Azure App – detailed stepsOffice 365 – Microsoft Graph beginning – Part 1Office 365 – Microsoft Graph – Part 2 – Granting permission to Azure Apps to use Microsoft Graph APIs using CSOMOffice 365 – Microsoft Graph – Part 3 – Azure Access Token: to call Graph APIs from CSOMOffice 365 – Microsoft Graph – Part 4 – Fetching all Office 365 groups using CSOM- CodebaseOffice 365 – Microsoft Graph – Part 5 – Fetching Office 365 group owners using CSOM – Codebase […]
[…] Office 365 – Microsoft Graph and Graph ExplorerOffice 365 – Azure Active Directory – Registering/Creating new Azure App – detailed stepsOffice 365 – Microsoft Graph beginning – Part 1Office 365 – Microsoft Graph – Part 2 – Granting permission to Azure Apps to use Microsoft Graph APIs using CSOMOffice 365 – Microsoft Graph – Part 3 – Azure Access Token: to call Graph APIs from CSOMOffice 365 – Microsoft Graph – Part 4 – Fetching all Office 365 groups using CSOM- CodebaseOffice 365 – Microsoft Graph – Part 5 – Fetching Office 365 group owners using CSOM – Codebase […]
You must log in to post a comment.