IT admins are often tasked with finding the license details of a user for compliance and audit purposes. While Graph PowerShell's Get-MgUserLicenseDetail command, an alternative to the Get-AzureADUserLicenseDetail command, can be used to obtain and export license details of a user in Microsoft Entra ID, its complexity and non-intuitive interface make it a challenging option. On the other hand, ADManager Plus, a Microsoft 365 management and reporting tool, simplifies the process, allowing admins to quickly generate and export the license details of a user in just a few clicks.
Export reports in multiple formats, including HTML, CSV, and PDF.
Schedule automatic report generation.
Instantly assign or revoke Microsoft 365 licenses.
Before using the Get-MgUserLicenseDetail cmdlet, ensure the following:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "User.Read.All"
The Get-MgUserLicenseDetail cmdlet can be used in Microsoft Graph PowerShell to fetch a user's license details in Microsoft Entra ID. Here's the syntax:
Get-EntraUserLicenseDetail
-UserId <String>
[-Property <String[]>]
[<CommonParameters>]
Listing the license details of a particular user
Get-MgUserLicenseDetail -UserId <'user_id'>
In this command, replace user_id with the user's ID for whom you would like to view the license details.
The following table contains some parameters that can be used along with the Get-MgUserLicenseDetail command to fetch the license details of a user in Microsoft Entra ID efficiently.
| Parameters | Description |
|---|---|
| -UserId | This parameter retrieves license details of a user based on their unique identifiers, such as user principal name or object ID. |
| -Property | This parameter retrieves specific attributes of a user's license details. |