A Beginner’s Guide to Using Graph Explorer for Intune Data Validation

by | Apr 17, 2024 | odds and ends

These days I’m working on a lot with Intune and finding way to expose more data from it. One of the simple ways to review the details stored within Intune, before you create a report is to use Graph Explorer. They use Graph Explorer before writing your reports? The simple answer is to Graph Explorer is a webpage that allow you to explore and validation Intune data. But it is not only use by Intune, it is used within many of the Microsoft services too.

Getting Started with Graph Explorer

You would think it was an executable that you installed on your laptop. Like WMI Explorer or File Explorer but it is not, it is a website. The first thing that you want to do it browse to https://developer.microsoft.com/en-us/graph/graph-explorer/.

Graph Explorer with sample data.

When you first arrive at the page, you will not be signed in to Graph and you will be using the tenant sample. Notice within the top right area it says Tenant Sample. To logon, select the user icon and sign into Graph Explorer.

Logon to my Tenant

Once you are logon, you will see that you are using your tenant and with your userid. Therefore, you can see the results for your environment.

Now that you have logon to Graph Explorer you would think that in the search window you could type Intune and get start. This is not the case, as such I would recommend that you review the online documentation as to where to find the details that you are looking for.

https://learn.microsoft.com/en-us/graph/api/resources/intune-graph-overview?view=graph-rest-1.0

deviceManagement

For my example, we will connect to https://graph.microsoft.com/beta/deviceManagement/managedDevices using Graph Explorer to retrieve a list of devices within my tenant. In the URL text bar, replace the existing url with https://graph.microsoft.com/beta/deviceManagement/managedDevices then click Run query.

Graph results deviceManagement

You can quickly see the results returned from Graph. This will give you an idea as to what data is returned and therefore is it useful to you. We can quickly see that the displayName is listed and that this device is Company owned. As we scroll down the list, we can see the other devices within this tenant.

Results for Garth's iPhone

For example, we can see my iPhone listed and it’s deviceOwnership is Personal.

Why is this important? For me, I use Graph Explorer to review the data details before trying to create a Power BI report set or export it for other projects. This allows me to validate the data, before I take the time to write the Power BI report. There is nothing worse than creating a report and it not showing you what you expect it to.

Filter

You can use the filter command to limit the results that you are querying for. This will reduce the data that is returned and therefore make things faster. In the example url below, the first one queries Intune for all Apple devices. Whereas the second one queries for all Microsoft devices.

You can change or add filters to query for only the devices you want to learn more about. This helps with your data validations.

https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter= (manufacturer eq ‘Apple’)

https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter= (manufacturer eq ‘Microsoft Corporation’)

Top

This command works like SQL server, it will select the first x devices. In the video, I selected the top 1 device. You can of course change this value to what every you want. The url is listed below.

https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter= (manufacturer eq ‘Microsoft Corporation’)&$top=1

Select

Again, the Select command acts like the SQL server command and only gives you the column values that you are selecting. In the example, I am selecting deviceName, manufacturer, and model values.

https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter= (manufacturer eq ‘Microsoft Corporation’)&$select=deviceName,manufacturer,model

Beta vs v1.0

This is a hard thing to answer there is the Official Microsoft stance and real-world stance. The short answer is always use v1.0 if you can help it but if not use the beta with the understanding that it could change it the future. Whereas the v1.0 can also change in the future however their will be advanced notice of this change.

Graph Explorer Forbidden Error

If you run a Graph command that you don’t have access to, Graph will tell you what permissions are required to complete this task.

Graph Explorer Forbidden Error

Notice within the text that DeviceManagementApps.Read.All or DeviceManagementApps.ReadWrite.All Permissions are required, in order to query all the mobile application within Intune via Graph.

Graph Explorer and Intune Data Validation

Now I could go on forever about validating your data. Or how to get started with Graph Explorer. The point of this blog and video are to get you started. But what really want to know is, what more do you want to know about Graph Explorer? Do I need to do advance topics? What do you want to see?

Getting Started with Graph Explorer video

In this video, I show you everything that I talked about within this blog and more.

Looking for more Intune topics?

Check out my free eBook on Intune Reporting. Navigating Intune Reporting: Elevate Your Reporting Skills with Power BI. It has many useful tips and tricks to get your started.

If you have any questions about Beginner’s Guide to Using Graph Explorer for Intune Data Validation. Please feel free to contact me @GarthMJ Please also subscribe to my YouTube channel and newsletter.