SystemIdentification SystemIdentification SystemIdentification SystemIdentification SystemIdentification Class

Definition

Provides information to uniquely identify the system on which the app is running.

public : static class SystemIdentification
static struct winrt::Windows::System::Profile::SystemIdentification
public static class SystemIdentification
Public Static Class SystemIdentification
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

This is a static class.

Methods

GetSystemIdForPublisher() GetSystemIdForPublisher() GetSystemIdForPublisher() GetSystemIdForPublisher() GetSystemIdForPublisher()

Gets an identifier value for the system based on the app publisher ID.

public : static SystemIdentificationInfo GetSystemIdForPublisher()
SystemIdentificationInfo GetSystemIdForPublisher() const;
public static SystemIdentificationInfo GetSystemIdForPublisher()
Public Static Function GetSystemIdForPublisher() As SystemIdentificationInfo
var systemIdentificationInfo = Windows.System.Profile.SystemIdentification.getSystemIdForPublisher();
Returns

Remarks

The identifier returned by this method is specific to the app publisher on the current device.

The ID has the following characteristics:

  • Unique for each system
  • On any particular system, all apps by the same publisher will get the same value for this ID (for all users). Conversely, apps by different publishers on the same system will obtain different IDs.
  • Can be created offline
  • Persists across restarts, reinstalls and upgrades of Windows, including clean installs (please see below for exceptions)
  • Persists across most hardware modifications
  • Available in OneCore

The method will first attempt to use the Trusted Platform Module (TPM), if present, to get an ID. If a TPM is not present, the method will try to get an ID from the Unified Extensible Firmware Interface (UEFI). If neither of these sources is available, this method will return an ID that is backed by the Windows registry. In the case of the Windows registry, the ID will not satisfy all the above guarantees. For example, if a system does not have a TPM or UEFI support, and thus an ID was obtained from the registry, a clean install of Windows will result in a new, different ID being returned. Callers of this method should refer to the Source property of the returned SystemIdentificationInfo to determine where the ID was obtained from in order to understand the guarantees provided.

GetSystemIdForUser(User) GetSystemIdForUser(User) GetSystemIdForUser(User) GetSystemIdForUser(User) GetSystemIdForUser(User)

Gets an identifier value for the system based on the user ID.

public : static SystemIdentificationInfo GetSystemIdForUser(User user)
SystemIdentificationInfo GetSystemIdForUser(User user) const;
public static SystemIdentificationInfo GetSystemIdForUser(User user)
Public Static Function GetSystemIdForUser(user As User) As SystemIdentificationInfo
var systemIdentificationInfo = Windows.System.Profile.SystemIdentification.getSystemIdForUser(user);
Parameters
user
User User User

The User data to use for creating the system ID. If the value is null, this method will get the current user's ID.

Returns
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
userSystemId

Remarks

The identifier returned by this method is specific to a user on the current device and allows for correlation of usage across different applications running on the same device for a particular user. Apps that are not multi-user-aware should only pass null into this method, which gets the current user's ID.

Use of this method is restricted by the userSystemId capability, which is a restricted capability requiring Microsoft approval. Please note that most callers should instead use the Windows.System.Profile.SystemIdentification.GetSystemIdForPublisher method instead as it is more appropriate for the large majority of use cases and does not require a restricted capability. If you do not need to obtain an ID that is shared across apps built by different publishers, you should not use this method.