Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

Translate Microsoft 365 License GUIDs to Product Names in PowerShell Microsoft Graph

June 6, 2024
in Blog, Microsoft Graph, Powershell
0
ADVERTISEMENT

Table of Contents

Translate Microsoft 365 License GUIDs to Product Names

Working with Microsoft 365 and Entra ID 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.

vd6iwsBcYRTyi37XIeTLfGIZJDfysu6gCa0mlt4s6uhoWv92vOOj1CqTOOOl

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.

$skus = Get-MgSubscribedSku -All
Invoke-WebRequest -Uri "https://download.microsoft.com/download/e/3/e/e3e9faf2-f28b-490a-9ada-c6089a1fc5b0/Product%20names%20and%20service%20plan%20identifiers%20for%20licensing.csv" -OutFile "$env:temp\LicenseNames.csv"
$translationTable = Import-Csv "$env:temp\LicenseNames.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 process will convert the skuPartNumber into the recognizable License name commonly seen in the Microsoft 365 admin center.

PS P:\> $skuNamePretty
Microsoft 365 E5 Compliance

We have combined all the previous code snippets to create a slightly more advanced, yet still fundamental script that outputs a table listing all the available license names.

$skus = Get-MgSubscribedSku -All
Invoke-WebRequest -Uri "https://download.microsoft.com/download/e/3/e/e3e9faf2-f28b-490a-9ada-c6089a1fc5b0/Product%20names%20and%20service%20plan%20identifiers%20for%20licensing.csv" -OutFile "$env:temp\LicenseNames.csv"
$translationTable = Import-Csv "$env:temp\LicenseNames.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.

LbadcoFCbv9gjhLBTa968fewJivanXeHN5qbpWLzPvRPCoid8SzHn4Ef5o7D

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.

ywB7tcfOyy8YoX1M67uwIWnKccLZJCQzdQ7kYbFXrhRDc2gUkhT8pn4NtqoI

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.

To make the PowerShell script cleaner, we’ve created a script, all you need to do is insert the below line into your script.

irm https://bonguides.com/pw/lictranslator | iex
# Output                                                       

LicenseName                    SkuPartNumber     SkuId                                ActiveUnits ConsumedUnits
-----------                    -------------     -----                                ----------- -------------
Microsoft 365 Business Premium SPB               cbdc14ab-d96c-4c30-b9f4-6ada7cdc1d46          25             1
Microsoft Fabric (Free)        POWER_BI_STANDARD a403ebcc-fae0-4ca2-8c8c-7a907fd6c235        9999             0

Output options to graphical grid view or export to CSV file.

iex "& { $(irm https://bonguides.com/pw/lictranslator) } -OutCSV"
iex "& { $(irm https://bonguides.com/pw/lictranslator) } -OutGridView"

Conclusion

Thanks to the CSV file provided by Microsoft, our scripts can consistently retrieve the latest data and convert any license GUID into a more recognizable format. We hope this assists you in creating more robust and improved scripts for managing licensing in MS Graph or PowerShell.

ADVERTISEMENT

Not a reader? Watch this related video tutorial:

5/5 - (1 vote)
Previous Post

How To Check Microsoft Office 365 Subscription Expiry Date

Next Post

How to Get Microsoft 365 License Expiration Dates using Graph Api

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory