Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Does the attribute userPrincipalName (UPN) always exist for users in Active Directory? Can you specify the Active Directory versions where it is not created during creation of a user?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

The User-Principal-Name attribute is only used within the User class. Note that the attribute is not marked mandatory.

The following Powershell example will create an AD user without a UPN:

Import-Module ActiveDirectory
New-ADUser -Name abUser

Observe that there is no UPN defined on the user object:

enter image description here

share|improve this answer
    
Thanks for the answer (+1). I see than in my AD (2003) the UPN is always created. I see in the customer AD it is not exist. Do you know if the old versions of AD also create the attribute? –  Michael Apr 30 '13 at 12:35
3  
@Michael When using Active Directory Users and Computers snap-in (dsa.msc) the UPN will almost certainly be auto-populated as part of the user creation process. Older versions of AD all the way back to 2000 (see the docs) defined the attribute. It seems more likely, to me, that a scripted/automated process may have been used to create the users lacking a defined UPN. –  jscott Apr 30 '13 at 12:43
1  
To list all users without a UPN, do the following: Get-ADUser -LDAPFilter "(!userPrincipalName=*)" -- You could "fix" the missing UPNs with a Powershell one-liner if needed. –  jscott Apr 30 '13 at 12:55
    
@jscott - you're quite right, deleting my answer as its nonsense. –  RobM Apr 30 '13 at 16:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.