Get LDAP Group Memberships from Active Directory

Hello all,
I would like to get User’s Group Memberships and dump them to a SQL table. I’ve dumped LDAP AD Users to SQL table, but I haven’t figured out a way to get Group Memberships using the LDAP connection.
any help?

Doesn’t AD have a memberOf bi-directional attribute on each user? If so, you should be able to fetch that and split/parse it. If not you probably have to get a full list of groups and search for your user in each one (which could take a while if you have a lot of groups).

1 Like

Interesting, I’ll look into that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.