Skip to main content
UserInformation.NameAccessAllowed | nameAccessAllowed property

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.
 

Syntax


var nameAccessAllowed = Windows.System.UserProfile.UserInformation.nameAccessAllowed;

public static bool NameAccessAllowed { get; }

Public Shared ReadOnly Property NameAccessAllowed As Boolean

public:
static property bool NameAccessAllowed { 
   bool get();
}

Property value

Type: Boolean [JavaScript] | System.Boolean [.NET] | Platform::Boolean [C++]

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.

Requirements (Windows 10 device family)

Device family

Desktop, introduced version 10.0.10240.0
Mobile, introduced version 10.0.10240.0

API contract

Windows.System.UserProfile.UserProfileContract, introduced version 1.0

Namespace

Windows.System.UserProfile
Windows::System::UserProfile [C++]

Metadata

Windows.System.UserProfile.UserProfileContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.System.UserProfile
Windows::System::UserProfile [C++]

Metadata

Windows.winmd

See also

UserInformation
User