User User User User Class
Definition
Represents a user.
public : sealed class User : IUserpublic sealed class User : IUserPublic NotInheritable Class User Implements IUser// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Properties
AuthenticationStatus AuthenticationStatus AuthenticationStatus AuthenticationStatus
Gets the authentication status of the user.
public : UserAuthenticationStatus AuthenticationStatus { get; }public UserAuthenticationStatus AuthenticationStatus { get; }Public ReadOnly Property AuthenticationStatus As UserAuthenticationStatus// You can use this property in JavaScript.
- Value
- UserAuthenticationStatus UserAuthenticationStatus UserAuthenticationStatus UserAuthenticationStatus
The authentication status of the user.
NonRoamableId 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// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The user's non-roamable Id.
Methods
CreateWatcher() 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// You can use this method in JavaScript.
A UserWatcher which enumerates users and raises events when the collection of users changes.
- See Also
FindAllAsync() 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 )// You can use this method in JavaScript.
When this method completes successfully, it returns a list (type IVectorView ) of Users.
- See Also
FindAllAsync(UserType) 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 )// You can use this method in JavaScript.
When this method completes successfully, it returns a list (type IVectorView ) of Users.
- See Also
FindAllAsync(UserType, UserAuthenticationStatus) 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 )// You can use this method in JavaScript.
- status
- UserAuthenticationStatus UserAuthenticationStatus UserAuthenticationStatus UserAuthenticationStatus
The authentication status of users to find.
When this method completes successfully, it returns a list (type IVectorView ) of Users.
- See Also
GetFromId(String) 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// You can use this method in JavaScript.
- nonRoamableId
- PlatForm::String String String String
The Id of the user to get.
GetPictureAsync(UserPictureSize) 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 )// You can use this method in JavaScript.
- desiredSize
- UserPictureSize UserPictureSize UserPictureSize UserPictureSize
The desired size of the user's picture to return.
When this method completes, it returns the user's picture.
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| Capabilities |
userAccountInformation
|
- See Also
GetPropertiesAsync(IVectorView)
GetPropertiesAsync(IVectorView)
GetPropertiesAsync(IVectorView)
GetPropertiesAsync(IVectorView)
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 )// You can use this method in JavaScript.
- values
- IVectorView<PlatForm::String> IReadOnlyList<String> IReadOnlyList<String> IReadOnlyList<String>
The properties to get. Use the KnownUserProperties class to obtain property names.
When this method completes, it returns the requested properties. If a property is missing or unavailable, it is reported as an empty string.
| 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) 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 )// You can use this method in JavaScript.
- value
- PlatForm::String String String String
The property to get.
When this method completes, it returns the requested property. If the property is missing or unavailable, an empty string is returned.
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| Capabilities |
userAccountInformation
|
- See Also