User Class

Definition

Represents a user.

public ref class User sealed
class User sealed
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IUserStatics), 65536, typeof(Windows.Foundation.UniversalApiContract))]
public sealed class User
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IUserStatics), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class User
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.IUserStatics), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class User
Public NotInheritable Class User
Inheritance
User
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Properties

AuthenticationStatus

Gets the authentication status of the user.

NonRoamableId

Gets the user's non-roamable id.

Type

Gets the user type.

Methods

CreateWatcher()

Creates a UserWatcher which enumerates users and raises events when the collection of users changes or when a user’s authentication state changes.

FindAllAsync()

Finds all users asynchronously.

FindAllAsync(UserType)

Finds all users of a given type asynchronously.

FindAllAsync(UserType, UserAuthenticationStatus)

Finds all users of a given type and authentication status asynchronously.

GetFromId(String)

Gets a user with a given Id.

GetPictureAsync(UserPictureSize)

Gets a user's picture asynchronously.

GetPropertiesAsync(IReadOnlyList<String>)

Gets properties for the user.

GetPropertyAsync(String)

Gets a property for the user. Use the KnownUserProperties class to obtain property names.

Applies to

See also