But my requirement is to display all those users which do not associate with any group,
how can I do that ??
posted 10 years ago
You have to perform "search" on the DirContext for your filter criteria. Basic way will be to retrieve all the users and check for the group attribute. If it's null then you can print the users without the group.
The efficient way will be to use DirContext.search() by checking for empty group attribute, something like below
memberof is group attribute in your ldap directory.