How I get my UPN from Active Directory? I need to test an app which uses Upn Claim type...
You might not know your UPN, and you might not be a domain admin. To find out the UPN for your account, run the following command from your workstation: whoami /upn. Although the result looks like an email address, it's the UPN on your local domain account.
In the Windows operating system's Active Directory, a User Principal Name (UPN) is the name of a system user in an e-mail address format. The user name (or "username") is followed by the "at sign" followed by the name of the Internet domain with which the user is associated.
User Principal Name is used to authenticate users on the Windows OS. It can replace other aspects of usernames within a Windows profile. It can also be used to abbreviate some long domain name lists.
In Microsoft's Active Directory the User Principal Name (UPN) is the unique sign in name or username, that uniquely identifies a user in the Directory. Microsoft uses Azure Active Directory (Azure AD) for all it's online business services (like Microsoft 365, Office 365, Dynamics 365, Power Apps, Azure, etc.)
This command should work.
C:> whoami /upn
The whoami.exe command comes with Windows Vista and later, but for those on XP you can download it as part of the XP Support Tools here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With