Table of Contents
Translate Microsoft 365 License GUIDs to Product Names
Working with Microsoft 365 and Azure AD licenses and understanding them can be quite the task for many system administrators. Did you know that the official Microsoft Learn article lists more than 3230 different SKU IDs and names as of June 1st 2023?
The problem is that Graph or PowerShell Modules never return a product name that actually means something to an admin. The names you’ll see there are not the same ones we’re used to from the Azure or M365 Admin Portals.
Let’s take a look at what the subscribedSkus that Graph PowerShell returns. This is how we get a list of all SKUs a tenant is subscribed to.
PS P:\> $skus = Get-MgSubscribedSku -All | select SkuPartNumber, SkuId, ConsumedUnits
PS P:\> $skus
SkuPartNumber SkuId ConsumedUnits
------------- ----- -------------
EMSPREMIUM b05e124f-c7cc-45a0-a6aa-8cf78c946968 19
ENTERPRISEPREMIUM c7df2760-2c81-4ef7-b578-5b5392b571df 0
ENTERPRISEPACK 6fd2c87f-b296-42f0-b197-1e91e994b900 0
FLOW_FREE f30db892-07e9-47e9-837c-80727f46fd3d 1
Win10_VDA_E3 6a0f6da5-0b87-4190-a6ae-9bb5a2b9546a 19
ENTERPRISEPREMIUM_NOPSTNCONF 26d45bd9-adf1-46cd-a9e1-51e9a5524128 19
INFORMATION_PROTECTION_COMPLIANCE 184efa21-98c3-4e5d-95ab-d07053a96e67 19
Or you can call to this Graph endpoint to get the list of subscriptions.
GET https://graph.microsoft.com/v1.0/subscribedSkus
The skuPartNumber is what Microsoft calls String ID on their learn article. As we all know, Microsoft is no stranger to changing or rebranding product names. We have never seen them change a skuPartNumber though.
What’s really nice is that Microsoft also provides a download link to a CSV file which contains all the SKUs, Ids and names. If it can be downloaded by using a browser, it can also be downloaded by PowerShell.
All we need to do is Invoke-RestMethod and use ConvertFrom-CSV to convert the retrieved content to a PowerShell object.
$translationTable = Invoke-RestMethod -Method GET -Uri "https://download.microsoft.com/download/e/3/e/e3e9faf2-f28b-490a-9ada-c6089a1fc5b0/Product%20names%20and%20service%20plan%20identifiers%20for%20licensing.csv" | ConvertFrom-Csv
The SKU information retrieved by graph is already in our $skus variable. So, all that’s left to do is a simple one-liner to search the $translationTable.GUID for a matching $sku.skuId .
$skuNamePretty = ($translationTable | Where-Object {$_.GUID -eq $sku.skuId} | Sort-Object Product_Display_Name -Unique).Product_Display_Name
This will translate the skuPartNumber to the familiar License name known from the admin portals.
PS P:\> $skuNamePretty
Microsoft 365 E5 Compliance
We’ve put all the above code snippets together and created a little more sophisticated, yet still very basic script which will output a table with all the available license names.
$skus = Get-MgSubscribedSku -All
$translationTable = Invoke-RestMethod -Method GET -Uri "https://download.microsoft.com/download/e/3/e/e3e9faf2-f28b-490a-9ada-c6089a1fc5b0/Product%20names%20and%20service%20plan%20identifiers%20for%20licensing.csv" | ConvertFrom-Csv
$output = @()
foreach ($sku in $skus) {
$skuNamePretty = ($translationTable | Where-Object {$_.GUID -eq $sku.skuId} | Sort-Object Product_Display_Name -Unique).Product_Display_Name
$skuDetails = [PSCustomObject][Ordered]@{
LicenseName = $skuNamePretty
SkuPartNumber = $Sku.SkuPartNumber
SkuId = $Sku.SkuId
ActiveUnits = $Sku.PrepaidUnits.Enabled
ConsumedUnits = $Sku.ConsumedUnits
}
$output += $skuDetails
}
$output | Out-GridView -Title "License Names"
The output will look like this.

As far as we understand, the download URL of the CSV should not be changed once a new version is uploaded. We verified this by viewing GitHubs commit history for that article.
As you can see, even though the date in the note was updated, the URL stayed the same. That’s why it should be safe to assume that we won’t need to update that URL in any script where we download that list.
Conclusion
Thanks to the CSV file hosted by Microsoft. Our scripts can now always grab the latest data and use that to translate any license GUID into something more recognizable.
We hope that this helps you too create more robust and better scripts when you need to deal with licensing in MS Graph or PowerShell.
Not a reader? Watch this related video tutorial: