Skip to content

merill/graphxray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

148 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Graph X-Ray: See the Code Behind the Clicks

Microsoft Edge Google Chrome Firefox
Microsoft Edge Add-ons Chrome Web Store Firefox Add-ons
Edge Web Store Users Edge Web Store Stars Chrome Web Store Users Chrome Web Store Stars Firefox Add-ons Users Firefox Add-ons Stars

Unlock the power of automation and learning in the Microsoft 365 ecosystem. Graph X-Ray is a developer tool that demystifies the Microsoft admin portals by revealing the exact Microsoft Graph API calls being made in the background as you work.

Stop spending hours digging through documentation to figure out how to automate a task. Simply perform the action in the portal, and Graph X-Ray will provide you with the corresponding, ready-to-use script. It's the ultimate "learn by doing" tool for Microsoft Graph.

Demo of opening Graph X-Ray panel

Key Features

  • API Call Inspection: Capture and inspect all Microsoft Graph API requests (GET, POST, PATCH, DELETE) and their full responses directly within your browser's developer tools.

  • Instant Script Generation: Automatically convert recorded API calls into functional code snippets.

  • Multi-Language Support: Generate scripts in the most popular languages for M365 automation, including:

    • Microsoft Graph PowerShell
    • Python
    • C#
    • JavaScript
    • Go
    • Java
    • Objective-C
  • Accelerate Automation: Go from a manual, repetitive task in the UI to a fully automated script in seconds.

Who is this for?

  • Microsoft 365 Administrators wanting to automate user management, policy configuration, and reporting.

  • DevOps Engineers building CI/CD pipelines for Microsoft 365 and Azure environments.

  • Developers creating applications that integrate with Microsoft Graph.

  • IT Consultants & Support Professionals who need to quickly script solutions for clients.

Supercharge your Microsoft 365 workflow. Install Graph X-Ray today and turn your clicks into code!

Install

Install the Graph X-Ray extension for your favorite browser.

Microsoft Edge Google Chrome Firefox
Microsoft Edge Add-ons Chrome Web Store Firefox Add-ons
Edge Web Store Users Edge Web Store Stars Chrome Web Store Users Chrome Web Store Stars Firefox Add-ons Users Firefox Add-ons Stars

Manual Install

To manually install the Graph X-Ray extension:

Chrome/Edge

  • Download the latest .zip file from the Releases page.
  • Extract the contents of the .zip file.
  • Open your browser and navigate to:
    • Microsoft Edge: edge://extensions
    • Google Chrome: chrome://extensions
  • Enable "Developer mode" by toggling the switch (usually in the bottom left or top right corner).
  • Click on "Load unpacked" and select the extracted folder.

Firefox

Install directly from Firefox Add-ons:

For manual loading, use the Firefox-specific zip from the Releases page:

  • Download graphxray-firefox-v<version>.zip.
  • Extract the contents of the .zip file.
  • Open Firefox and navigate to about:debugging#/runtime/this-firefox.
  • Click Load Temporary Add-on and select the manifest.json file from the extracted files (zip root).

If you prefer to build from source:

  • Clone the repository: git clone https://github.com/merill/graphxray.git
  • Navigate to the project directory: cd graphxray
  • Install dependencies: npm install
  • Build for Firefox: npm run build:firefox
  • Open Firefox and navigate to about:debugging#/runtime/this-firefox
  • Click Load Temporary Add-on and select the manifest.json file from the build folder

Supported Microsoft Graph Endpoints

The extension detects and generates code snippets for Microsoft Graph calls across:

  • graph.microsoft.com (Public cloud)
  • graph.microsoft.us (US Government cloud - GCC High)
  • dod-graph.microsoft.us (US Department of Defense)
  • microsoftgraph.chinacloudapi.cn (China cloud)

Supported Microsoft Admin Portal Environments

The extension works with any web page that makes Graph API calls. We've primarily tested with

  • Microsoft Entra
  • Microsoft Intune

If there are admin portals where you are not seeing Graph X-Ray work as expected, please open an issue, even better, submit a pull request by following the steps in Adding non-Graph API calls to Ultra X-Ray.

Using Graph X-Ray

Viewing the Graph call stack trace

To view Graph calls in real-time:

  • Browse to the Microsoft admin portal (Entra, Intune...)
  • Open Developer Tools
  • Open the Graph X-Ray panel in Developer Tools
  • Make changes in the portal to record and view the corresponding Graph API calls and PowerShell commands

Demo of opening Graph X-Ray panel

Step by step guide

Open Developer Tools

Using the keyboard
  • Press F12 on Windows
  • Press Cmd+Opt+I on macOS
Using the menu
  • On Microsoft Edge open the menu from the top right then select Extensions
  • On Google Chrome open the menu from the top right then select More Tools and click Extensions

Screenshot of selecting Developer Tools in Edge

Open the Graph X-Ray panel

Expand the tabs in Developer Tools and select the Graph X-Ray panel.

If you don't see the Graph X-Ray panel you may need to restart your browser.

Screenshot of opening Graph X-Ray pane

View Graph call stack trace

Make changes in the Azure Portal to view the corresponding Graph API calls and PowerShell commands for the action (e.g. edit a user's profile information and click Save).

Scroll down in the Graph X-Ray panel to view the new stack trace.

Screenshot of viewing graph changes

Developer Guide

Pre-requisites

  • Install Node.js (which includes npm)
  • Run npm install to install dependencies

Build the extension

npm start to compile and debug

To load the extension, go to chrome://extensions or edge://extensions, turn on developer mode, click on "load unpacked", and navigate to the ./dev folder.

Production build

Production builds are automatically created in GitHub with the right version number.

If you want to create a production build of the extension on your desktop:

  • For Chrome/Edge + Firefox output folders in one run: npm run build
  • For Firefox-only flow: npm run build:firefox

The build artifacts will be placed in the build folder:

  • build/graphxray
  • build/graphxray-firefox

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

This command also creates:

  • build/graphxray (Chrome/Edge package folder)
  • build/graphxray-firefox (Firefox package folder)

npm run build:firefox

Builds the app specifically for Firefox, using the Firefox manifest (Manifest V2) instead of the Chrome/Edge manifest (Manifest V3).

See the section about deployment for more information.

Adding non-Graph API calls to Ultra X-Ray

Ultra X-Ray shows calls to non-Graph API endpoints. Unfortunately, we need to explicitly add each endpoint to the extension.

To add support for a new endpoint.

  1. Figure out the API endpoint - View the network requests in the browser's developer tools and find out the domain where the API is hosted.
  2. Add domain to domains.js - Add the new domain to the list of domains in the domains.js file.
  3. Add domain to manifest.json - Note the manifest requires the / at the end of the domain.
  4. Test the endpoint - Make a request to the new blade and verify that it appears in Graph X-Ray.

Firefox notes

Key Firefox-specific details:

  • Manifest Version: Firefox build uses Manifest V2 while Chrome/Edge uses Manifest V3.
  • Background scripts: Firefox build uses event-based background script handling.
  • Browser APIs: The project uses a compatibility layer so both browser.* and chrome.* usage works.
  • CSP format: Firefox manifest uses string CSP format.

Firefox-specific files:

  • public/manifest.firefox.json
  • public/dev.firefox.js
  • src/common/browserApi.js
  • scripts/build-firefox.js

Known Firefox limitations:

  • DevTools panel behavior can differ slightly from Chromium browsers.
  • Storage quotas differ from Chromium.
  • Some permissions can behave differently.

Firefox debugging tips:

  • Use about:debugging to inspect extension/background logs.
  • Use browser console (Ctrl+Shift+J) for extension runtime errors.

Feedback and Support

This is an independently developed application and is not endorsed or supported by Microsoft.

Please share feedback and report issues on Github.

Acknowledgements

This project was originally a hackathon project by Eunice, Dhruv, Clement, Monica & @merill.

Special thanks to @jorgeasaurus for major contributions including Firefox support and key reliability improvements such as the PowerShell fallback behavior.

License

Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

About

πŸ‘‹ Ever performed an action in the Microsoft admin portals like Entra or Intune and wished you knew how to script it? Graph X-Ray gives you 'X-ray vision'!

Topics

Resources

License

Stars

Watchers

Forks

Contributors