UserInformation.NameAccessAllowed UserInformation.NameAccessAllowed UserInformation.NameAccessAllowed UserInformation.NameAccessAllowed UserInformation.NameAccessAllowed Property

Definition

Allows you to see if your app is allowed to access the user's information.

Important

The UserInformation class is not supported on Windows 10 or later. Use the User class instead. See Remarks in the UserInformation class documentation.

public : static Platform::Boolean NameAccessAllowed { get; }
static bool NameAccessAllowed();
public static bool NameAccessAllowed { get; }
Public Shared ReadOnly Property NameAccessAllowed As bool
var bool = Windows.System.UserProfile.UserInformation.nameAccessAllowed;

Property Value

bool bool bool

True if your app is allowed access to the AccountPictureChanged event, and is allowed to retrieve user information by using the GetAccountPicture, GetDisplayNameAsync, GetDomainNameAsync, GetFirstNameAsync, GetLastNameAsync, and GetSessionInitiationProtocolUriAsync methods. Otherwise, this property is false.

Remarks

Important

The UserInformation class is not supported on Windows 10 or later. Use the User class instead. See Remarks in the UserInformation class documentation.

If this property is false, the GetDisplayNameAsync, GetDomainNameAsync, GetFirstNameAsync, and GetLastNameAsync methods return an empty string, while the GetAccountPicture and GetSessionInitiationProtocolUriAsync methods return a null value.

See also