How to get the number of active licenses use Microsoft Graph's cmd

Anonymous
2021-12-13T06:10:46.713+00:00

Hi

How do I get the number of active licenses use Microsoft Graph's cmd ?

Before, I used 'Get-MsolAccountSku' in PowerShell to get 'ActiveUnits', but now I use'Get-MgSubscribedSku'. After execution, there is no' ActiveUnits'. I am a novice in this field. Although I have

also conducted an investigation, I can't find it, so please help me.

Thanks in advance
157061-snipaste-2021-12-13-14-08-24.png

157034-2.png

Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Graph
{count} vote

Accepted answer
  1. Vasil Michev 119.7K Reputation points MVP Volunteer Moderator
    2021-12-13T07:07:52.44+00:00

    The info is there, you just need to display it:

    Get-MgSubscribedSku | select -First 1 -Skip 1 | select -ExpandProperty PrepaidUnits
    
    3 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Keerthi Jakkam 1 Reputation point
    2022-08-02T16:25:19.32+00:00

    I saw equalant command for Get-MsolSubscription in https://learn.microsoft.com/en-us/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0 is Get-MgSubscription

    But I am not able to get any details status,DateCreated,TotalLicenses,SkuPartNumber,NextLifecycleDate,OcpSubscriptionId.

    0 comments No comments

  2. Aarts, Jan 16 Reputation points
    2022-11-08T15:13:21.243+00:00

    Get-MgSubscribedSku | | select {$_.PrepaidUnits.enabled}, ConsumedUnits, skupartnumber
    gives you the list you want I think

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.