Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Based Distribution List - Attributes

Status
Not open for further replies.

AmoebaFrank

Technical User
Jan 18, 2010
3
GB
I want to query the attribute 'employeeNumber' as I want to return only users that have an entry in this field.

As this does not appear in the options I have created a query and then modified the msExchDynamicDLFilter attribute in ADSI Edit.

(&(!cn=SystemMailbox{*})(&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) )))(objectCategory=user)(employeeNumber=*))))

If I test this using 'Find' in ADU&C it works fine and returns 514 results but the preview in the QBDL displays no results.

Can only certain fields be queried in a QBDL?
 
AmoebaFrank,

I use very complicated and non standard queries in QDLs and they work just fine. One suggestion to make it work:

Create a QDL and use it’s filter to include all users with extensionAttribute1 set to whatever. Then using ADSIEDIT replace the extensionAttribute1 in the QDL to employeeNumber.

That’s how I made it work.

Hope it’ll work for you as well.

Regards,

Michael.
 
Hi Michael, thanks for your reply. Sorry but what you are suggesting is what I have already done. I modified the msExchDynamicDLFilter attribute in ADSI Edit the put the employeeNumber field in.

The problem is this query works in a normail ADU&C Find but not in a QBDL.
 
Wow! What a puzzle!

You're right. Tried everything and still doesn’t work in QDL.

I’ll keep on testing. Gotta find out why!

Regards,

Michael
 
AmoebaFrank,

OK. I think I may know why it’s not working. The bad news is that if I’m right, it’ll never work.

I was doing some testing in our lab and couldn’t make it work. So, I started thinking that it may have something to do with this particular attribute (employeeNumber). I then had a closer look at the attributes of the QBDL and noticed two multi valued attributes:
allowedAttributes and allowedAttributesEffective. In these attributes are lists of attributes allowed in the query. Guess what? employeeNumber is not there. Unfortunately I’ve been unable to edit these two attributes using ADSIEDIT, LDP and even AD Schema.

If in fact only attributes listed in allowedAttributes are allowed in the QBDL query, you will have to use another attribute to make it work. You can replicate all employeeNumber attributes to let’s say extensionAttribute1 and create query based on that.

Regards,

Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top