What is UPN (User Principal Name)?

Knowledge Base

What is UPN (User Principal Name)?

In Windows Active Directory, a User Principal Name (UPN) is the name of a system user in an email address format. A UPN (for example: john.doe@domain.com) consists of the user name (logon name), separator (the @ symbol), and domain name (UPN suffix).

Important

A UPN is not the same as an email address. Sometimes, a UPN can match a user's email address, but this is not a general rule. 

How to check or modify the UPN of a user

Use the links below to learn how to check and change UPNs in various environments.

Microsoft Exchange Server

To check or modify a UPN in Exchange, you need to:

  1. Open Active Directory Users and Computers on your domain controller (DC) machine. Right-click any user and choose Properties (Fig. 1.).

Checking the UPN of an Active Directory user.
Fig. 1. Checking the UPN of an Active Directory user.

  1. You can check and change the UPN of your user on the Account tab, in the User logon name section (Fig. 2.).

Checking the UPN of an Active Directory user.
Fig. 2. A UPN of a user.

A UPN address can also be set by using the following ps PowerShell cmdlets:

import-module activedirectory
Get-ADUser -Filter * -SearchBase 'ou=<your ou>,dc=<your domain>,dc=<your top level domain>' -Properties userPrincipalName | foreach { Set-ADUser $_ -UserPrincipalName ("{0}@{1}" -f $_.name,"<your UPN suffix>")}

Office 365

The UPN address is also present inOffice 365, where it is assigned by default for any new user. You can check the UPN of an Office 365 user in the Users > Active users section in Microsoft 365 admin center (Office 365 admin center), as shown in Fig. 3.

In Office 365, UPNs are displayed in the Username column.
Fig. 3. In Office 365, UPNs are displayed in the Username column.

 

Troubleshooting

In Office 365, you might stumble upon a problem where users' UPN suffixes are still in the domain.onmicrosoft.com format instead of your domain's suffixes (e.g. my-company.com). To solve this issue, you can edit the UPN addresses for Office 365 users by using Azure Active Directory Module for Windows PowerShell:

  1. Import Azure Active Directory Module for your PowerShell:
    import-module MSOnline
  2. Connect to Office 365 by running this cmdlet:
    $msolcred = get-credential
    connect-msolservice -credential $msolcred
  3. Change the UPN of your user:
    Set-MsolUserPrincipalName -UserPrincipalName <current UPN> -NewUserPrincipalName <new UPN>

You can find more information on a similar problem in this Microsoft article.

See also:

Was this information useful?