Using UnboundID LDAP sdk, how can I get all the LDAP groups a particular user belongs to? (I would really appreciate some example code).
相关问题
- Password Reset Enforcing Directory Policies with U
- View modified entries in LDAPusing UnboundId api
- How to use UnboundID SDK to connect to an LDAP ser
- LDAPException size limit exceeded
- connect android to openLDAP server
相关文章
- How to use UnboundID SDK to connect to an LDAP ser
- LDAPException size limit exceeded
- connect android to openLDAP server
- LDAP changing user password on Active Directory
- How to get DN and password with UnboundID
- Retrieve All Members of Large AD Groups
- how to use UnboundID LDAP in android?
- UnboundID LDAP SDK: Get all groups for a user
The function below will work only for the Active Directory since it generates the membership attribute memberOf. If I will found the way for a general LDAP I will add it.
I have the same problem. However, the solution by Michael doesn't work for me, since it doesn't work recursively.
Apparently, there is a "magic" AD query that gets all groups recursively, see Find Recursive Group Membership (Active Directory) using C# and How do I filter an LDAP query for groups containing a specific user?
While our AD admin has fetched all groups from the command line using ldifde, I can't get the query to work with UnboundID. Our CN has spaces inside, and UnboundID adds a weird '5c' - but even with a (technical) user without spaces, I don't get any result.
Anyway, here's my working (and unefficient) source code (using Google Guava). I've left out some methods and constants, I think you can guess what the value for the constant
OBJECT_CLASS
is :-)