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

 

fig 1 Graph Explorer

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

fig 2 Graph Explorer sample queries

Figure 2: Office 365 – Graph Explorer – Sample Queries

This tool also contains the history of our queries which we executed as

fig 3 Graph Explorer query history

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

fig4 Queries in Graph Explorer

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

fig5 query response

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

fig6graphapipermissions

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

fig7modifypermissions

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.

Prasham Sabadra

LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

7 Responses

  1. December 22, 2018

    […] 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 […]

  2. December 23, 2018

    […] Office 365 – Microsoft Graph and Graph Explorer […]

  3. December 24, 2018

    […] Office 365 – Microsoft Graph and Graph Explorer […]

  4. December 25, 2018

    […] Office 365 – Microsoft Graph and Graph Explorer […]

  5. December 26, 2018

    […] 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 […]

  6. December 29, 2018

    […] 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 […]

  7. January 12, 2019

    […] 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 […]

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: