Reputation: 13834
Using a search filter, is it possible to retrieve the last value of a multi-valued field for an object e.g. the department field of the inetOrgPerson?
For instance, if my user cn=Alice has 2 values for department, can I somehow write a search filter that will return the last value only?
Thanks.
Upvotes: 0
Views: 991
Reputation: 21435
I found a draft for ordered entries and values:
https://datatracker.ietf.org/doc/html/draft-chu-ldap-xordered-00
If your LDAP server implements this schema extension you might succeed in searching for the nth value of a multi-valued attribute
Upvotes: 1
Reputation: 4868
LDAPSearch filters are meant to find and filter LDAP entries. In the LDAP request, the list of attributes to retrieve is a separate parameter from the filter. An LDAP Extension (a Control) exists to specify to match and retrieve only matching values of a multi-valued attribute, specified in RFC 3876. This extension is not implemented in all LDAP directory services, nor in all LDAP clients.
Upvotes: 2