c, co, and country Code

For United States / US:
c = US
co = United States
countryCode = 840

I am writing this because I am a bit surprised that I couldn’t find this information quickly through a quick Google Search. I am trying to populate my user’s country information into Active Directory so that Office 365 DirSync can push that info to o365 cloud when creating new users. I happen to be using FIM to populate my on-ground AD accounts and when I go to populate the country attribute(s) I realize that there are three attributes including “c”, “co”, and “countryCode”. A Google Search will turn up the fact that the “c” attribute is an ISO standard country code (duh!). Here is the official ISO source for those country codes
http://www.iso.org/iso/home/standards/country_codes/iso-3166-1_decoding_table.htm
and here is a non-confusing streight forward version of the same thing
http://www.dovestones.com/country-codes-used-active-directory/

OK so what about the “co” and “countryCode” attribute? It seems that no one on the Interweb wants to talk about those. Everyone just says “use the ISO two letter country code”. Umm….. no. The “countryCode” attribute in Active Directory is a number field that defaults to 0 (zero) and it will not accept a ISO 3166 country code. After some digging of my own, I found that “co” is a friendly country name string, but I would assume that it’s still limited to accepted values.

Basically, I just went into the ADUC properties on a test user and modified the “Country/region” dropdown under the Address tab of the user properties. Then I went into ADSI Edit and looked at how the values of the three attributes changed when I modified that dropdown. You have to refresh ADSI Edit after each change or it will just show you the cached attribute properties.

 

 

 

 

Advertisements

About jcurrie1234

MCSE,CCNA,CWNA,Security+,Network+,A+
This entry was posted in Active Directory, ForeFront Identity Manager, o365 dirSync, Office 365 and tagged , , , , , . Bookmark the permalink.

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s