Active Directory – pulling your hair out trying to get the username?

After much digging and trying to get the userPrincipalName and/or samAccountName properties when doing a search for users on my Active Directory thingy, I found an obscure post on an obscure site that mentioned the “cn” property being used as the actual username.  All of the other sites I’d seen said that “cn” was the user’s first name (or “christian name”).  I pulled the “cn” and viola, the username was right there.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: