Define LDAP query with objectclass

Hi

We have a 3. party software that can get information through LDAP but can't figure out how to define the search string.

If I type "OU=Test,DC=internal,DC=contoso,DC=local" it will return all users in the OU, but I need it to return contacts.

Is it possible to create a LDAP query where it looks in the above OU and only shows contacts?

Hopefully my question makes sense :-)

July 1st, 2013 2:30pm

Hi,

An OU location is only part of an LDAP query. Search engines are your friend. I entered in "LDAP query for contacts" in a search engine.

Here is one of the top results:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa746475.aspx

Bill

Free Windows Admin Tool Kit Click here and download it now
July 1st, 2013 5:28pm

We don't know how your third party tool works, but for any query there should be at least two, possibly three pieces of information. First is the "base" of the query, which you gave (the distinguished name of an OU). Next should be a filter, to restrict the query to the objects you want. For contact objects the filter would be:

(objectClass=contact)

The third piece of information would be the list of attribute values to retrieve for each object. Does the filter I gave help you? Documentation using LDAP filters here:

http://social.technet.microsoft.com/wiki/contents/articles/5392.active-directory-ldap-syntax-filters.aspx

These filters can be used in VBScript, PowerShell, and command line utilities like dsquery or adfind.

July 1st, 2013 5:34pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics