Entra ID Identity & License Inventory Tool
Entra ID Identity & License Inventory Tool
The Microsoft Entra ID Identity & License Inventory Tool is a read-only PowerShell-based utility designed to discover and report on identity and licensing data within a Microsoft Entra ID tenant.
The tool provides visibility into key identity components, including users, groups, devices, and license assignments.
It summarizes user states (enabled, disabled), licensing status (licensed and unlicensed users), and total license assignments across the tenant.
In addition, it enumerates subscribed license SKUs, showing total purchased, assigned, and available licenses.
This tool is intended for identity inventory, license management visibility, audit preparation, and baseline assessment of tenant identity posture.
The script is executed in Azure Cloud Shell using Microsoft Graph PowerShell and requires appropriate read permissions.
It performs read-only operations and does not modify any resources.
Requirements:
Execution Environment:
- Azure Cloud Shell (PowerShell) or PowerShell 7+
- Internet connectivity to access Microsoft Graph
Authentication:
- Azure authentication:
Connect-AzAccount
- Microsoft Graph authentication:
Connect-MgGraph -Scopes "User.Read.All","Group.Read.All","Device.Read.All","Directory.Read.All"
Permissions:
Microsoft Entra ID (Microsoft Graph):
- User.Read.All (Read User Information)
- Group.Read.All (Read Group Information)
- Device.Read.All (Read Device Information)
- Directory.Read.All (Read Directory And License Data)
Azure (if infrastructure inventory is included):
- Reader Role (minimum) at Subscription or Tenant Level
Modules:
- Az PowerShell Module (preinstalled in Cloud Shell)
- Microsoft Graph PowerShell Module
Required Graph Modules:
- Microsoft.Graph.Users
- Microsoft.Graph.Groups
- Microsoft.Graph.Devices
- Microsoft.Graph.Identity.DirectoryManagement
Notes:
- The Tool Performs Read-Only Operations
- No Changes are made to Tenant Resources
- Output depends on the Permissions Granted to the Authenticated User
Disclaimer
========================================
This tool is provided as-is without warranties of any kind,
express or implied. It is intended for informational,
inventory, and audit purposes only.
The script performs read-only operations and does not modify
any Microsoft Entra ID or Azure resources.
Results are based on the permissions granted to the authenticated
user and may be incomplete if access is restricted.
The author assumes no responsibility for any errors, omissions,
or decisions made based on the output of this tool.