Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.44 KB

userinformation_getprincipalnameasync_1189555193.md

File metadata and controls

34 lines (23 loc) · 1.44 KB
-api-id -api-type
M:Windows.System.UserProfile.UserInformation.GetPrincipalNameAsync
winrt method

Windows.System.UserProfile.UserInformation.GetPrincipalNameAsync

-description

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.)

Important

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

-returns

The user's principal name.

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

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.

-examples

-see-also

User