Skip to content

Interactive Microsoft Graph search tool using console GUI for various Microsoft 365 and Azure AD object types.

License

Notifications You must be signed in to change notification settings

jorgeasaurus/MgConsoleGuiGraphSearch

Repository files navigation

📖 Microsoft Graph Console GUI Search Tool

Welcome to the Microsoft Graph Console GUI Search Tool! This interactive PowerShell function allows you to search and view detailed information for various Microsoft 365 and Azure AD objects through a friendly console-based GUI.

🚀 Overview

Demo

Quickly search and explore Microsoft 365 and Azure AD objects using an intuitive console-based GUI interface. The tool simplifies the process of finding and viewing detailed information about various Microsoft Graph resources.

This tool provides an interactive console-based GUI using Out-ConsoleGridView that enables you to search for and display full details of Microsoft Graph objects such as:

  • 👤 Users
  • 👥 Groups
  • 💻 Devices
  • 📱 Mobile Apps
  • 🔐 Service Principals
  • ⚙️ Settings Catalog Policies
  • 📄 Configuration Profiles
  • 𝍒 Compliance Policies
  • 📲 App Protection Policies
  • 💡 Discovered Apps

It leverages the Microsoft Graph Beta API endpoints and requires appropriate permissions for each object type.

🔧 Prerequisites

Before using this tool, please ensure you have the following installed:

  • Microsoft.Graph.Beta PowerShell module
    (Install using: Install-Module Microsoft.Graph.Beta)
  • Microsoft.PowerShell.ConsoleGuiTools module
    (Install using: Install-Module Microsoft.PowerShell.ConsoleGuiTools)
  • PowerShell version 6.0 or later

Also, ensure you have connected to Microsoft Graph with the required scopes/permissions, for example:

  • User: User.Read.All
  • Group: Group.Read.All
  • Device: Device.Read.All
  • Mobile App: DeviceManagementApps.Read.All
  • Service Principal: Application.Read.All
  • Settings Catalog / Config Profile: DeviceManagementConfiguration.Read.All
  • App Protection DeviceManagementApps.Read.All
  • Compliance Policy DeviceManagementConfiguration.Read.All
  • Discovered Apps DeviceManagementManagedDevices.Read.All

⚙️ How It Works

  1. Import the Function

    . .\Invoke-MgConsoleGuiGraphSearch.ps1
    
    # Or with full path
    
    . "C:\Path\To\Invoke-MgConsoleGuiGraphSearch.ps1"
  2. Connect to Microsoft Graph: Before running the search tool, connect to Microsoft Graph using:

    Connect-MgGraph -Scopes "User.Read.All", "Group.Read.All", "Device.Read.All", "DeviceManagementApps.Read.All", "Application.Read.All", "DeviceManagementConfiguration.Read.All"
  3. Select an Object Type: Use the -ObjectType parameter to specify the type of object you want to search for. Valid values include:

    • User
    • Group
    • Device
    • MobileApp
    • ServicePrincipal
    • SettingsCatalog
    • ConfigProfile
    • AppProtection
    • CompliancePolicy
    • DiscoveredApps
  4. Interactive Selection: A grid view appears, showing a subset of common properties for quick selection. Once you select one or more items, the tool retrieves and displays the full details of the selected objects.

Optional Search: Provide a search string using the -Search parameter to filter results. If no search string is provided, the function retrieves all items for the selected object type.

Optional Output Type: Use the -OutputType parameter to specify the type of output you want returned. Valid values include:

  • JSON
  • Grid
  • List
  • Table
  • System.Object

System.Object is default if none is provided.

📚 Usage Examples

List All Users

Invoke-MgConsoleGuiGraphSearch -ObjectType User

Search for Groups Containing "IT"

Invoke-MgConsoleGuiGraphSearch -ObjectType Group -Search "IT"

Search for Devices Running Windows

Invoke-MgConsoleGuiGraphSearch -ObjectType Device -Search "Windows"

List All Mobile Apps

Invoke-MgConsoleGuiGraphSearch -ObjectType MobileApp

Search for Service Principals with "Microsoft"

Invoke-MgConsoleGuiGraphSearch -ObjectType ServicePrincipal -Search "Microsoft"

List Settings Catalog Policies

Invoke-MgConsoleGuiGraphSearch -ObjectType SettingsCatalog

Search Configuration Profiles (e.g., for macOS)

Invoke-MgConsoleGuiGraphSearch -ObjectType ConfigProfile -Search "MacOS"

Retrieve App Protection Policies (e.g., for iOS) and output the result in JSON format.

Invoke-MgConsoleGuiGraphSearch -ObjectType AppProtection -Search "iOS" -OutputType JSON

List Device Compliance Policies

Invoke-MgConsoleGuiGraphSearch -ObjectType CompliancePolicy

Retrieve Discovered Apps (e.g., containing “Zune”)

Invoke-MgConsoleGuiGraphSearch -ObjectType DiscoveredApps -Search "Zune"

🔗 Useful Links

🎉 Conclusion

This tool simplifies searching through Microsoft Graph objects with an interactive and user-friendly console GUI. Enjoy exploring your Microsoft 365 and Azure AD data! 😄

About

Interactive Microsoft Graph search tool using console GUI for various Microsoft 365 and Azure AD object types.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published