Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray

This guide will help you to automate your Intune daily task with using Graph X Ray. This article will teach us how to use effectvly use Graph X-Ray to automate the Microsoft Intune Tasks.

What’s Graph X-Ray? Graph X-Ray is a hackathon project built by Eunice Waweru, Dhruv, Clement, Monicah M. Wambugu, and Merill Fernando. I can’t go further without giving them a shoutout for building this awesome tool and making our lives easy. Thanks to the team!!

Graph X-Ray is a tool designed to help users view the Microsoft Graph API and PowerShell commands related to actions taken in the Entra and Intune portals. It helps to see the context-sensitive PowerShell commands and the corresponding Graph API commands and URLS for actions performed on these portals

This tool is particularly beneficial for developers and IT professionals and admins who require a comprehensive understanding of the underlying API calls and PowerShell commands associated with various operations within Entra and Intune portals. Access to Graph X-Ray is available through browser extensions for both Chrome and Edge.

Patch My PC

Before You Begin

Before you begin, make sure to install the Microsoft Graph PowerShell Modules. Microsoft has published the Microsoft Graph PowerShell SDK on the PowerShell Gallery. The SDK includes two modules, Microsoft. Graph and Microsoft.Graph.Beta are called the Microsoft Graph REST API v1.0 and Microsoft Graph REST API beta.

Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray - Fig.1
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray – Fig.1

To install the Microsoft Graph PowerShell SDK, your PowerShell version should be at least 5.1 or later. However, Microsoft recommends having PowerShell 7 or later. As per Microsoft, no additional prerequisites are required to use the SDK with PowerShell 7 or later.

Read More : Best Guide to Install Microsoft Graph PowerShell Modules

You should have .NET Framework 4.7.2 or later installed on your machine before installing Microsoft Graph PowerShell modules. Microsoft suggests updating PowerShellGet to the latest version using the command Install-Module PowerShellGet. Also, the PowerShell script execution policy must be set to remote signed or less restrictive.

How to Download the Graph X-Ray?

As mentioned above access to Graph X-Ray is available through browser extensions for both Chrome and Edge. Also, you can download the Graph X-Ray Windows Store Desktop App as well.

Graph X-Ray Browser Extensions
Google Chrome Extension
Microsoft Edge Add-On
Windows Store Desktop App
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray – Table 1

In this example, I will download the extention for Google Chrome browser. You can follow the same procedure for Microsoft Edge and Windows Store Desktop App.

Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray - Fig.2
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray – Fig.2

You will be redriected to Graph X Ray extention webpage and you will have option to add the extension to the Chrome. Click on Add to Chrome.

Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray - Fig.3
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray – Fig.3

You will get a confirmation popup asking as below. Please click on Add extension. Well, Graph X-Ray is added to your Google Chrome browser as extension.

Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray - Fig.4
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray – Fig.4

How to Use Microsoft Graph X-Ray?

Let’s learn how to use the Microsoft Graph X-Ray. You can view the Graph API calls made by the Azure Portal or Intune Portal and the PowerShell cmdlets in Graph X-Ray. In this example, I will explore the Graph API calls and PowerShell cmdlets that related to Intune.

  • Sign in to the Microsoft Intune Admin portal
  • Navigate to any tasks you would like to automate or view the Graph API calls and PowerShell cmdlets.
  • In this example, I will naviagte to Apps > All Apps
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray - Fig.5
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray – Fig.5

Go to Developer tools by clicking Ctrl + Shift + I. Google Chrome Developer Tools allow you to quickly check and analyze the content or resources of a webpage. Click on the two arrow button (>>) and Select Graph X-Ray.

Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray - Fig.6
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray – Fig.6

You will get a Microsoft Graph X-Ray page when you click on Graph X-Ray. The Graph X-Ray allows for the saving of scripts; this is an excellent feature. Also, you could clear the session once you finish your work.  

Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray - Fig.7
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray – Fig.7

Select PowerShell language and click on Apps Overview. Microsoft Graph X-Ray dispalys all the Graph API calls that are being made by the current browser tab. Also, you could see the PowerShell cmlets that could help you to automate the selected Intune task.

NOTE! Graph X-Ray supports multiple languages  (PowerShell, Go, C#, Java, JavaScript, Objective-C)
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray - Fig.8
Complete Guide to Automate the Microsoft Intune Daily Tasks using of Graph X Ray – Fig.8

You can use the same method to obtain any Graph API calls and PowerShell cmdlets that will assist you in automating your daily Microsoft Intune tasks.

I trust that this article will significantly benefit you and your organization. I appreciate your patience in reading this post. I look forward to seeing you in the next post. Keep supporting the HTMD Community.

Need Further Assistance or Have Technical Questions?

Join the LinkedIn Page and Telegram group to get the latest step-by-step guides and news updates. Join our Meetup Page to participate in User group meetings. Also, Join the WhatsApp Community to get the latest news on Microsoft Technologies. We are there on Reddit as well.

Author

About the Author: Sujin Nelladath, Microsoft Graph MVP with over 11 years of experience in SCCM device management and Automation solutions, writes and shares his experiences with Microsoft device management technologies, Azure, DevOps and PowerShell automation.

Leave a Comment

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