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.
Table of Contents
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.
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.
- Best Guide to Restart Intune Devices Remotely using Microsoft Graph API and PowerShell
- Intune Policy Assignment Classification Easy Secrets of using Graph API with PowerShell
- Manage Intune Tasks with PowerShell
- Managing Windows Bitlocker Compliance Policy Using Intune | MS Graph | Grace Period
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 |
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.
- Open the Google Chrome and access https://graphxray.merill.net/
- Click on Download button
- Click on Google Chrome Extension
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.
- Time to use Microsoft Graph Device Management PS Module Instead of MS Graph Intune Module
- Run Remediation Script on-demand for Windows Devices using Intune
- PowerShell Script to Create a Local Admin Account using Intune
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.
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
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.
- Intune Device Compliance Reports | Endpoint Manager
- Easiest Method to Enable MFA for Admins using Azure AD Conditional Access
- Managing Windows Bitlocker Compliance Policy Using Intune | MS Graph | Grace Period
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.
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)
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.
- How to Retrieve PowerShell Scripts from Intune using Microsoft Graph
- Explore Kusto Query Language (KQL) and Intune Device Query
- Best Guide to Restart Intune Devices Remotely using Microsoft Graph API and PowerShell
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, a 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.