How to retrieve SQL Server 2022 Enterprise product keys associated with our Azure subscription / M365 tenant for VM migration

Aadarsh Mani (MAQ LLC) 20 Reputation points Microsoft External Staff
2026-06-08T13:56:39.72+00:00

We recently migrated 7 Windows Server 2022 VMs in our Azure subscription to Windows Server 2025. Two of these VMs previously ran SQL Server 2022 Enterprise Edition; the remaining five ran Developer Edition.

As part of the migration we snapshotted the original VMs, deleted them, and provisioned fresh WS2025 VMs. We do not retain a record of the original 25-character SQL Server product keys, and we were unable to recover them from the running VMs prior to deletion — the install-time key is not exposed by SQL Server post-install (only a partial ProductID stub is visible in the registry).

We have temporarily installed SQL Server 2022 Evaluation Edition on the rebuilt VMs as a 180-day production-legal bridge, and we need to convert to Enterprise via Edition Upgrade before the Evaluation expiry.

What we need help with

Locating the existing Enterprise key(s) tied to our organization's licensing entitlement so we can perform an in-place Edition Upgrade on the 2 rebuilt VMs without reinstalling.

Confirming current entitlement — how many Enterprise Core licenses (or Server/CAL equivalents) our tenant owns, and whether they are still under active Software Assurance.

Extending coverage from 2 → 4 Enterprise installations if our existing entitlement does not already cover the additional 2 VMs that will need Enterprise (these are currently on Developer Edition but require Enterprise post-migration for production compliance).

  1. Guidance on the correct portal/path to retrieve the keys. We have looked at:
    • Volume Licensing Service Center (VLSC) (redirecting to M365 Admin)
    Our current accounts do not appear to have the visibility/role needed to download keys or view license quantities for SQL Server.

Environment details we can share securely if needed

  • Azure subscription ID (US Public cloud)
  • Microsoft Entra tenant ID
  • VM resource IDs for the two affected production VMs
  • Approximate purchase timeframe and reseller/agreement type, if known

Specific questions

  • Which licensing portal or role assignment do we need to view/download SQL Server 2022 Enterprise keys?
  • Who in our organization (Global Admin / Billing Admin / Volume Licensing contact) needs to perform the lookup?
  • What is the recommended path to add 2 additional Enterprise Core licenses if our current entitlement is insufficient?
  • Does Azure Hybrid Use Benefit (AHUB) apply to our Enterprise entitlement so we can flag the SqlVirtualMachine resource accordingly?
SQL Server on Azure Virtual Machines

Answer accepted by question author
Pilladi Padma Sai Manisha 11,715 Reputation points Microsoft External Staff Moderator
2026-06-10T09:17:04.6066667+00:00

Hi @Aadarsh Mani (MAQ LLC)
SQL Server product keys cannot be recovered from an existing SQL Server installation after deployment. Since the original VMs were deleted, the recommended approach is to obtain the Enterprise product keys and entitlement information from your organization's licensing records.

The correct portal depends on the licensing program (EA, CSP, MCA, MPSA, etc.). Access is typically limited to designated licensing administrators, billing administrators, or volume licensing contacts within your organization.

To verify:

  • SQL Server 2022 Enterprise entitlement
  • Available product keys
  • Software Assurance status
  • Additional licensing requirements for the planned Enterprise deployments

please contact your organization's licensing administrator, licensing reseller, CSP partner, or Microsoft account team.

Once the appropriate Enterprise key is obtained, you can perform an in-place Edition Upgrade from SQL Server 2022 Evaluation to Enterprise using SQL Server Setup.

Azure Hybrid Benefit may be available if your SQL Server licenses include the necessary Software Assurance or subscription rights; however, eligibility should be validated through your licensing agreement.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Oldest
  1. Amira Bedhiafi 43,046 Reputation points MVP Volunteer Moderator
    2026-06-08T20:12:03.8233333+00:00

    Hello Aardash !

    Thank you for posting on MS Learn Q&A.

    The SQL Server key is not retrieved from the Azure subscription or the deleted VM and it must come from your org licensing agreement or CSP purchase record.

    Go to Microsoft 365 admin center then Billing then Your products then Volume licensing.

    Then use Products and services then View downloads and keys and search for SQL Server 2022.

    For SQL Server 2022, the embedded license product key can be shown in the product details Keys tab alternatively download the SQL Server media and check x64\DefaultSetup.ini.

    https://learn.microsoft.com/en-us/microsoft-365/commerce/licenses/product-keys-for-vl?view=o365-worldwide

    You can also go to Volume licensing then Contracts then View contracts then View product keys for the relevant License ID.

    For access, the user must have a Volume Licensing role for the relevant License ID. A normal Global Administrator role is not enough by itself. because they do not automatically have access to VL features and a VL Agreement Administrator must add them. The roles most relevant here are Product keys reader, Product download manager, License position reader or Administrator depending on whether the person needs keys, downloads, license summaries or role management.

    If you want to confirm entitlement, you need to use Contracts then Create License Summary. The license summary shows entitlements, effective quantity and active Software Assurance quantity for License IDs you can view. Active SA quantity is the key field for Azure Hybrid Benefit eligibility.

    If your licenses were bought under MPSA, CSP, MCA, OEM or retail, they might not appear in classic VL contracts, so check the appropriate purchase channel or partner.

    https://learn.microsoft.com/en-us/microsoft-365/commerce/licenses/view-vl-contracts?view=o365-worldwide

    For the SQL Server instances, Evaluation then Enterprise is a supported SQL Server 2022 edition upgrade for standalone installations and Setup asks for a production PID/product key during the edition upgrade.

    Also note that SQL Server Evaluation is for internal evaluation only and is not licensed for production use, so this should be treated as urgent from a compliance perspective.

    For the additional 2 Enterprise VMs, work with your Microsoft reseller / Licensing Solution Partner / Microsoft account representative to purchase enough SQL Server Enterprise core licenses, preferably with Software Assurance or qualifying subscription rights if you want Azure Hybrid Benefit. Enterprise is considered as a 2-core pack under Volume Licensing, and notes Azure Hybrid Benefit as a Software Assurance benefit.

    https://www.microsoft.com/en-us/sql-server/sql-server-2022-pricing

    For SQL Server on Azure VM, Azure Hybrid Benefit requires SQL Server licenses with active Software Assurance or qualifying subscription licenses. Microsoft also notes that only SQL Server core-based licensing with SA or subscription licenses is eligible for the full Azure Hybrid Benefit; Server + CAL with SA can use license mobility/BYOL but not all AHB features.

    https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/licensing-model-azure-hybrid-benefit-ahb-change?view=azuresql

    After the VM is running licensed SQL Server Enterprise, register it with the SQL IaaS Agent extension if it is self-installed, then set the SQL VM license type to AHUB:

    az provider register --namespace Microsoft.SqlVirtualMachine
    az sql vm create \
      --name <vm_name> \
      --resource-group <resource_group_name> \
      --location <vm_location> \
      --license-type AHUB
    

    For an already registered SQL VM resource:

    az sql vm update \
      --name <sql_vm_resource_name> \
      --resource-group <resource_group_name> \
      --license-type AHUB
    

    PAYG, AHUB and DR as the SQL VM license-type values, and states that self-installed SQL Server VMs must be manually registered with the SQL IaaS Agent extension.

    https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-agent-extension-manually-register-single-vm?view=azuresql

    Was this answer helpful?

    0 comments No comments

Your answer

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