Platform SDK: Active Directory, ADSI, and Directory Services

ADsPath

Just as a file has a fully qualified path in the file system, objects in the directory have a string that represents their exact location within the directory hierarchy. This path is called the ADsPath, and it is used for binding to the object. Binding is discussed later.

The initial elements of the ADsPath string are the programmatic identifier (ProgID) of the ADSI provider, followed by "://", followed by a path, as dictated by the provider. The path is the server name, followed by the distinguished name of the object. An example of the ADsPath to an Exchange mailbox would be:

"LDAP://MyServer/o=OrgName/ou=SiteName/cn=Recipients/cn=MyMailbox"

Another representation for the same object is:

"LDAP://MyServer/cn=MyMailbox,cn=Recipients,o=SiteName,o=OrgName"

Note  For the LDAP service provider, the ProgID "LDAP", is case sensitive.

The Exchange LDAP server accepts the LDAP cn attribute in the path as being mapped to the LDAP rdn attribute ("Directory Name" to Exchange). The LDAP cn attribute is actually mapped to the Exchange Display Name attribute. In other words, the "cn=" part of the path shows the value stored in the Exchange Directory Name, but when you ask the LDAP server for cn it gives you the Exchange Display Name. This can be confusing but was done because some systems use an unfriendly value for Directory Name, such as employee ID.