Get-EntraAccountSku

Retrieves all the SKUs for a company.

Syntax

Get-EntraAccountSku
 []
Get-EntraAccountSku
   [-TenantId <String>]
   [<CommonParameters>]

Description

The Get-EntraAccountSku retrieves the list of commercial subscriptions acquired by an organization.

For a list of license names in the Microsoft Entra or Microsoft 365 admin centers and their corresponding Microsoft Graph skuId and skuPartNumber properties, refer to the mapping information.

In delegated scenarios with work or school accounts, when acting on another user, the signed-in user must have a supported Microsoft Entra role or a custom role with the necessary permissions. The following least privileged roles support this operation:

  • Dynamics 365 Business Central Administrator (read-only access to standard properties)
  • Global Reader
  • Directory Readers

Examples

Example 1: Gets a list of SKUs

Connect-Entra -Scopes 'Organization.Read.All', 'LicenseAssignment.Read.All'
Get-EntraAccountSku

Id                                                                        AccountId                            AccountName   AppliesTo CapabilityStatus ConsumedUnits SkuId                                SkuPartNumber
--                                                                        ---------                            -----------   --------- ---------------- ------------- -----                                -------
eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User  User      Suspended        20            aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE…
ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User  User      Suspended        20            bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP…
dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User  User      Suspended        2             cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP…

This command returns a list of SKUs.

Example 2: Gets a list of SKUs by TenantId

Connect-Entra -Scopes 'Organization.Read.All','LicenseAssignment.Read.All'
$tenantId = (Get-EntraContext).TenantId
Get-EntraAccountSku -TenantId $tenantId

Id                                                                        AccountId                            AccountName   AppliesTo CapabilityStatus ConsumedUnits SkuId                                SkuPartNumber
--                                                                        ---------                            -----------   --------- ---------------- ------------- -----                                -------
eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User  User      Suspended        20            aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE…
ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User  User      Suspended        20            bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP…
dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User  User      Suspended        2             cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP…

This command returns a list of SKUs for a specified tenant.

  • -TenantId parameter specifies the unique ID of the tenant.

Parameters

-TenantId

The unique tenant ID for the operation. Defaults to the current user's tenant if not specified. This parameter is included for compatibility with legacy PowerShell modules

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False