Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UserInformation.GetPrincipalNameAsync | getPrincipalNameAsync method

Applies to Windows and Windows Phone

Gets the principal name for the user. This name is the User Principal Name (typically the user's address, although this is not always true.)

Syntax


Windows.System.UserProfile.UserInformation.getPrincipalNameAsync().done( /* Your success and error handlers */ );

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<String>

The user's principal name.

Remarks

Only domain users have a principal name. Access to the principal name can be blocked by privacy settings (for example, if the UserInformation::NameAccessAllowed property is false). If access is blocked, this method returns an empty string.

This method requires the enterpriseAuthentication capability.

This method does not throw an exception.

To see how to access the principal name, check out the User domain name sample.

Requirements

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

 

 

Show:
© 2014 Microsoft