Microsoft KB Archive/196850

{|
 * width="100%"|

INFO: Viewing Hidden or Deleted Exchange Objects via ADSI/LDAP

 * }

Q196850

-

The information in this article applies to:


 * Microsoft Active Directory Service Interfaces, versions 2.0, 2.5
 * Microsoft Exchange Server, version 5.5

-

SUMMARY
In order to view hidden and deleted objects in the Exchange directory, you must explicitly connect to the server as an Exchange admin account and specify an additional username component of "cn=admin".

MORE INFORMATION
You can bind explicitly as an admin by using a Bind DN (ADSI username) of the following form:

  "cn=username,dc=domain,cn=admin" The username and domain should be replaced with appropriate values, while the cn=admin portion is literal and should be used as is.

The following Microsoft Visual Basic code illustrates binding as an admin using ADSI LDAP:

  Set adsNS = GetObject("LDAP:") Set adsObj = adsNS.OpenDsObject(strObjName,"cn=" & strUser & ",dc=" & _

strDomain & ",cn=admin", strPassword, 0 ) NOTE: When you connect with "cn=admin", hidden and deleted objects appear mixed with normal objects. You must test for (or filter on) the Is-Deleted or Hide-From-Address-Book properties to distinguish them from normal objects.