Share via

Unique ID of machine

Anjali Narvekar 0 Reputation points
2026-02-05T09:18:15.0933333+00:00

Hi,

Can anyone suggest which of the following methods to retrieve uniqueid from machine and more stable and reliable?

1.SMBIOS System UUID

Source: SMBIOS Type 1 table, retrieved via GetSystemFirmwareTable('RSMB').

2.TPM Endorsement Key Public Key (EKPub)

NCRYPT_PCP_EKPUB_PROPERTY

(queried with NCryptGetProperty)

from MS_PLATFORM_CRYPTO_PROVIDER.

3.Windows MachineGuid (Registry)

Registry path:

HKLM\SOFTWARE\Microsoft\Cryptography\MachineGuid

  1. SystemIdentification.GetSystemIdForPublisher Method
Developer technologies | Universal Windows Platform (UWP)
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Danny Nguyen (WICLOUD CORPORATION) 6,455 Reputation points Microsoft External Staff Moderator
    2026-02-06T08:55:14.6466667+00:00

    Hi,

    Thank you for posting in Microsoft Q&A,

    If you’re asking for a “unique machine ID”, it helps to clarify what you need it for, because the best option differs by scenario.


    1. UWP / MSIX app

    Use Windows.System.Profile.SystemIdentification.GetSystemIdForPublisher(). This is the supported UWP API for a per-device identifier that is scoped to your publisher, and it avoids fragile ASHWID-style fingerprints (CPU/RAM/Disk). Also check SystemIdentificationInfo.Source to understand how durable it is on a particular device.

    SystemIdentification.GetSystemIdForPublisher Method

    SystemIdentificationInfo.Source Property

    2. Hardware-rooted identity

    Use the TPM Endorsement Key public key (EKPub) (via NCRYPT_PCP_EKPUB_PROPERTY). This is the most hardware-bound option and is typically stable unless the TPM/motherboard is replaced. Note this is more in the enterprise/attestation/provisioning category, may be restricted by policy, and has stronger privacy considerations.


    I hope this helps.


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.