Get-EntraUserLicenseDetail
Retrieves license details for a user.
Syntax
Get-EntraUserLicenseDetail
-UserId <String>
[-Property <String[]>]
[<CommonParameters>]
Description
This cmdlet retrieves license details for a user.
Examples
Example 1: Retrieve user license details
Connect-Entra -Scopes 'User.Read.All'
Get-EntraUserLicenseDetail -UserId 'SawyerM@contoso.com'
Id SkuId SkuPartNumber
-- ----- -------------
X8Wu1RItQkSNL8zKldQ5DiH6ThjDmF1OlavQcFOpbmc aaaaaaaa-0b0b-1c1c-2d2d-333333333333 INFORMATION_PROTECTION_COMPLIANCE
X8Wu1RItQkSNL8zKldQ5Dk8SXrDMx6BFpqqM94yUaWg bbbbbbbb-1c1c-2d2d-3e3e-444444444444 EMSPREMIUM
X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERPRISEPREMIUM
This example demonstrates how to retrieve license details for a user from Microsoft Entra ID.
Parameters
-Property
Specifies properties to be returned
Type: | System.String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserId
The object ID of the user for which the license details are retrieved.
Type: | System.String |
Aliases: | ObjectId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
System.String
Outputs
System.Object