| -api-id | M:Windows.System.Profile.SystemIdentification.GetSystemIdForUser(Windows.System.User) |
|---|---|
| -api-type | winrt method |
Gets an identifier value for the system based on the user ID.
The User data to use for creating the system ID. If the value is null, this method will get the current user's ID.
A SystemIdentificationInfo object for this system, based on the user ID.
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.
Note
This method returns a hardware-based identifier intended for device correlation. To access the properties of the current user (such as display name or account name), use Windows.System.User.GetDefault (available from Windows 10, version 2104) instead.
userSystemId