I have Active Directory links with an extended attribute called “distinguishedName”. The Link objects also have a non-extended attribute called “identity” that holds the same value.
For the life of me I cannot get a working QueryOption Filter configured to search against either of these so I must be missing something basic. I’ve tried every combination I can think of such as these. Please let me know what I’m missing here, I don’t know how to reference these attributes.
String dn = "...";
QueryOptions qo = new QueryOptions();
// None of these work
qo.add(Filter.eq("identity", dn));
qo.add(Filter.eq("attribute.identity", dn));
qo.add(Filter.eq("links.identity", dn));
qo.add(Filter.eq("links.attribute.identity", dn));
qo.add(Filter.eq("distinguishedName", dn));
qo.add(Filter.eq("links.distinguishedName", dn));
qo.add(Filter.eq("attribute.distinguishedName", dn));
qo.add(Filter.eq("links.attribute.distinguishedName", dn));
qo.add(Filter.eq("LinkExternalAttribute.identity", dn));
qo.add(Filter.eq("LinkExternalAttribute.distinguishedName", dn));
List<Link> links = context.getObjects(Link.class, qo);
I may be using the wrong terminology since when I looked at external attributes nothing popped up. However, here is an example of what I see when I look at an AD Link inside of an Identity object:
Is there something special that has to be done in order to create a Filter that would match either the identity value or distinguishedName attribute? As stated everything I’ve tried so far results in a “could not resolve property” error.