User User User Class

Definition

Represents a user.

public : sealed class User : IUserpublic sealed class User : IUserPublic NotInheritable Class User Implements IUser
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

AuthenticationStatus AuthenticationStatus AuthenticationStatus

Gets the authentication status of the user.

public : UserAuthenticationStatus AuthenticationStatus { get; }public UserAuthenticationStatus AuthenticationStatus { get; }Public ReadOnly Property AuthenticationStatus As UserAuthenticationStatus
Value
UserAuthenticationStatus UserAuthenticationStatus UserAuthenticationStatus

The authentication status of the user.

Attributes

NonRoamableId NonRoamableId NonRoamableId

Gets the user's non-roamable id.

public : PlatForm::String NonRoamableId { get; }public string NonRoamableId { get; }Public ReadOnly Property NonRoamableId As string
Value
PlatForm::String string string

The user's non-roamable Id.

Attributes

Type Type Type

Gets the user type.

public : UserType Type { get; }public UserType Type { get; }Public ReadOnly Property Type As UserType
Value
UserType UserType UserType

The user type.

Attributes

Methods

CreateWatcher() CreateWatcher() CreateWatcher()

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

public : static UserWatcher CreateWatcher()public static UserWatcher CreateWatcher()Public Static Function CreateWatcher() As UserWatcher
Returns

A UserWatcher which enumerates users and raises events when the collection of users changes.

Attributes
See Also

FindAllAsync() FindAllAsync() FindAllAsync()

Finds all users asynchronously.

public : static IAsyncOperation<IVectorView<User>> FindAllAsync()public static IAsyncOperation<IReadOnlyList<User>> FindAllAsync()Public Static Function FindAllAsync() As IAsyncOperation( Of IReadOnlyListUser )
Returns
IAsyncOperation<IVectorView<User>> IAsyncOperation<IReadOnlyList<User>> IAsyncOperation<IReadOnlyList<User>>

When this method completes successfully, it returns a list (type IVectorView ) of Users.

Attributes
See Also

FindAllAsync(UserType) FindAllAsync(UserType) FindAllAsync(UserType)

Finds all users of a given type asynchronously.

public : static IAsyncOperation<IVectorView<User>> FindAllAsync(UserType type)public static IAsyncOperation<IReadOnlyList<User>> FindAllAsync(UserType type)Public Static Function FindAllAsync(type As UserType) As IAsyncOperation( Of IReadOnlyListUser )
Parameters
type
UserType UserType UserType

The type of users to find.

Returns
IAsyncOperation<IVectorView<User>> IAsyncOperation<IReadOnlyList<User>> IAsyncOperation<IReadOnlyList<User>>

When this method completes successfully, it returns a list (type IVectorView ) of Users.

Attributes
See Also

FindAllAsync(UserType, UserAuthenticationStatus) FindAllAsync(UserType, UserAuthenticationStatus) FindAllAsync(UserType, UserAuthenticationStatus)

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

public : static IAsyncOperation<IVectorView<User>> FindAllAsync(UserType type, UserAuthenticationStatus status)public static IAsyncOperation<IReadOnlyList<User>> FindAllAsync(UserType type, UserAuthenticationStatus status)Public Static Function FindAllAsync(type As UserType, status As UserAuthenticationStatus) As IAsyncOperation( Of IReadOnlyListUser )
Parameters
type
UserType UserType UserType

The type of users to find.

status
UserAuthenticationStatus UserAuthenticationStatus UserAuthenticationStatus

The authentication status of users to find.

Returns
IAsyncOperation<IVectorView<User>> IAsyncOperation<IReadOnlyList<User>> IAsyncOperation<IReadOnlyList<User>>

When this method completes successfully, it returns a list (type IVectorView ) of Users.

Attributes
See Also

GetFromId(String) GetFromId(String) GetFromId(String)

Gets a user with a given Id.

public : static User GetFromId(PlatForm::String nonRoamableId)public static User GetFromId(String nonRoamableId)Public Static Function GetFromId(nonRoamableId As String) As User
Parameters
nonRoamableId
PlatForm::String String String

The Id of the user to get.

Returns

The user with the given Id.

Attributes

GetPictureAsync(UserPictureSize) GetPictureAsync(UserPictureSize) GetPictureAsync(UserPictureSize)

Gets a user's picture asynchronously.

public : IAsyncOperation<IRandomAccessStreamReference> GetPictureAsync(UserPictureSize desiredSize)public IAsyncOperation<IRandomAccessStreamReference> GetPictureAsync(UserPictureSize desiredSize)Public Function GetPictureAsync(desiredSize As UserPictureSize) As IAsyncOperation( Of IRandomAccessStreamReference )
Parameters
desiredSize
UserPictureSize UserPictureSize UserPictureSize

The desired size of the user's picture to return.

Returns
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
userAccountInformation
See Also

GetPropertiesAsync(IVectorView<String>) GetPropertiesAsync(IVectorView<String>) GetPropertiesAsync(IVectorView<String>)

Gets properties for the user.

public : IAsyncOperation<IPropertySet> GetPropertiesAsync(IVectorView<PlatForm::String> values)public IAsyncOperation<IPropertySet> GetPropertiesAsync(IReadOnlyList<String> values)Public Function GetPropertiesAsync(values As IReadOnlyList<String>) As IAsyncOperation( Of IPropertySet )
Parameters
values
IVectorView<PlatForm::String> IReadOnlyList<String> IReadOnlyList<String>

The properties to get. Use the KnownUserProperties class to obtain property names.

Returns

When this method completes, it returns the requested properties. If a property is missing or unavailable, it is reported as an empty string.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
userAccountInformation
See Also

GetPropertyAsync(String) GetPropertyAsync(String) GetPropertyAsync(String)

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

public : IAsyncOperation<PlatForm::Object> GetPropertyAsync(PlatForm::String value)public IAsyncOperation<object> GetPropertyAsync(String value)Public Function GetPropertyAsync(value As String) As IAsyncOperation( Of object )
Parameters
value
PlatForm::String String String

The property to get.

Returns
IAsyncOperation<PlatForm::Object> IAsyncOperation<object> IAsyncOperation<object>

When this method completes, it returns the requested property. If the property is missing or unavailable, an empty string is returned.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
userAccountInformation
See Also