User.GetPropertiesAsync(IVectorView<String>) User.GetPropertiesAsync(IVectorView<String>) User.GetPropertiesAsync(IVectorView<String>) User.GetPropertiesAsync(IVectorView<String>) User.GetPropertiesAsync(IVectorView<String>) Method

Definition

Gets properties for the user.

public : IAsyncOperation<IPropertySet> GetPropertiesAsync(IVectorView<Platform::String> values)
IAsyncOperation<IPropertySet> GetPropertiesAsync(IVectorView<winrt::hstring> values) const;
public IAsyncOperation<IPropertySet> GetPropertiesAsync(IReadOnlyList<String> values)
Public Function GetPropertiesAsync(values As IReadOnlyList(Of String)) As IAsyncOperation(Of IPropertySet)
Windows.System.User.getPropertiesAsync(values).done( /* Your success and error handlers */ );

Parameters

values
IReadOnlyList<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.

Additional features and requirements

Capabilities
userAccountInformation

Remarks

Not all properties are available for all users. The following table summarizes which properties are available under various conditions.

Property Local account not domain joined Local account domain joined MSA account AAD account
AccountName Not available Not available Not available Not available
DisplayName Not available Not available Not available Available if domain joined
DomainName Not available Available Not available Available
FirstName Available Available Available Available
GuestHost Available on XBOX Available on XBOX Available on XBOX Available on XBOX
LastName Available Available Available Available
PrincipalName Not available Available Not available Available if domain joined
ProviderName Not available Not available Not available Not available
SessionInitiationProtocolUri Not available Available Not available Available if domain joined

See also