Click to See Complete Forum and Search --> : LDAP Query Problems


Nancy Forbes
10-16-2002, 05:21 PM
We are trying to make our Exchange 2000 Address Lists match up with our Active Directory OU containers. For example I want an Address List for everyone in our Corporate Headquarters which is OU=48. I have tried using canonicalName and distinguishedName. I cannot get any version of canonicalName to return any records even an exact match with a user. I can get exact matches on distinguishedName to work for an individual user but for my address list I need to use a substring with a wildcard in the distinguishedName filter and I can't get it to work.

Here are some examples.
Both of these worked in that they returned all email addresses. I want to expand upon the distinguishedName though to limit to a particular OU.
1. (&(mailnickname=*)(objectClass=user))
2. (&(mailnickname=*)(objectClass=user)(distinguishedNa me=*))

These don't work. The last 2 examples being what I am after.
1. (&(mailnickname=*)(objectClass=user)(distinguishedNa me=Johnson*))
2. (&(mailnickname=*)(objectClass=user)(canonicalName=* ))
3. (&(mailnickname=*)(objectClass=user)(distinguishedNa me=*OU=48,DC=mydomain,DC=com))
4. (&(mailnickname=*)(objectClass=user)(canonicalName=m ydomain.com/48/*))

Is there a trick to getting Wildcards to work? Do you have any other suggestions for matching up Address lists to OU's?