Available fields for ADSI Linked in SQL Server

Chris Klepeis picture Chris Klepeis · Jun 30, 2009 · Viewed 12.8k times · Source

We currently have a View that queries active directory info. I was wondering if there was a good reference as to what fields (field names) are available in AD for me to query against. I don't have access to Active Directory so I can't go playing around in there to maybe figure it out myself. Any help would be appreciated.

Answer

Andrew Sledge picture Andrew Sledge · Jun 30, 2009

Active Directory uses LDAP v3. This version specifies that any fields may be modified, added, and removed, but in order for AD to work properly there are many fields it retains. You can view the schema for your AD instance by going to the domain controller and using the schema editor (in MMC) to view the available fields, but as you said you do not have access to those resources. Here are the common attributes used across most LDAP implementations:

givenName: first name

sn: last name

telephoneNumber: phone number

streetAddress: street address

l: city

st: state

c: country

postalCode: zip code