Microsoft Tech Community Live:  Microsoft Teams Edition
November 09, 2021, 08:00 AM - 12:00 PM (PST)

License prefix format

%3CLINGO-SUB%20id%3D%22lingo-sub-2381225%22%20slang%3D%22en-US%22%3ELicense%20prefix%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2381225%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20upgrade%20from%20the%20MSOnline%20powershell%20module%20to%20the%20MicrosoftTeams%20module.%3C%2FP%3E%3CP%3EPreviously%2C%20the%20Get-MsolAccountSku%26nbsp%3B%20returned%20the%20AccountSkuId%20is%20in%20the%20format%26nbsp%3B%3C%2FP%3E%3CP%3Etenantname%3Alicensename%20e.g.%20contoso%3AENTERPRISEPACK%3C%2FP%3E%3CP%3EIn%20the%20Teams%20module%20when%20I%20run%20the%26nbsp%3BGet-AzureADSubscribedSku%20command%2C%20the%20closest%20thing%20that%20I%20can%20see%20to%20this%20format%20is%20the%20objectId%20which%20is%20in%20the%20format%26nbsp%3B%3C%2FP%3E%3CP%3EtenantGuid%3AskuGuid%20e.g.%26nbsp%3B44cbfb1e-xxxx-xxxx-xxxx-xxxxxxxxxxxx_6fd2c87f-b296-42f0-b197-1e91e994b900%3C%2FP%3E%3CP%3EIs%20there%20a%20convenient%20way%20to%20convert%20from%20the%20new%20format%20to%20the%20old%20format%20using%20powershell%3F%3C%2FP%3E%3CP%3EThanks%20in%20advance%2C%3C%2FP%3E%3CP%3ESimon%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%20class%3D%22syntaxhighlighter%20%20powershell%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2381225%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2385922%22%20slang%3D%22en-US%22%3ERe%3A%20License%20prefix%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2385922%22%20slang%3D%22en-US%22%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F33461%22%20target%3D%22_blank%22%3E%40Simon%20Shaw%3C%2FA%3E%2C%20%3CBR%20%2F%3EGet-AzureADSubscribedSku%20will%20provide%20all%20sku%20details.%3CBR%20%2F%3Eif%20you%20want%20per%20user%20basis.%20%3CBR%20%2F%3E%24a%20%3D%20Get-MsolUser%20-UserPrincipalName%20%24UPN%20%7C%20select%20-ExpandProperty%20licenses%3CBR%20%2F%3E%24b%20%3D%20%24a.AccountSkuId%3C%2FLINGO-BODY%3E
New Contributor

I am trying to upgrade from the MSOnline powershell module to the MicrosoftTeams module.

Previously, the Get-MsolAccountSku  returned the AccountSkuId is in the format 

tenantname:licensename e.g. contoso:ENTERPRISEPACK

In the Teams module when I run the Get-AzureADSubscribedSku command, the closest thing that I can see to this format is the objectId which is in the format 

tenantGuid:skuGuid e.g. 44cbfb1e-xxxx-xxxx-xxxx-xxxxxxxxxxxx_6fd2c87f-b296-42f0-b197-1e91e994b900

Is there a convenient way to convert from the new format to the old format using powershell?

Thanks in advance,

Simon

 

 
2 Replies
Hi @Simon Shaw,
Get-AzureADSubscribedSku will provide all sku details.
if you want per user basis.
$a = Get-MsolUser -UserPrincipalName $UPN | select -ExpandProperty licenses
$b = $a.AccountSkuId
Isn't the Get-MsolUser cmdlet part of the MSOnline powershell module which was end of life 3 months ago?