vcplearner
Programmer
Hi everybody,
I am currently having to retrieve some data from a MS Site Server membership directory (that uses LDAP) using ADSI programming.
Specifically I need to retrieve ALL the members (and groups) that are directly under a specified group.
ALL the groups from a specified member through:
hr = pIADs->GetEx(L"Groups", vMemberOfs);
where pIADs is a IADs object obtained through
COMCALL(pIDirObject->QueryInterface(IID_IADs, (void**)&pIADs));
pIDirObject is an IDirectoryObject that has been successfully (verified properly) bound to the specified group or membership object (for example cn=adams,ou=HCP,o=Microsoft)
but strange enough I am not able to retrieve all the MEMBERS of a specified group (of MGROUP schema) through
hr = pIADs->GetEx(L"Member", vMemberOfs); (or by using "Members" or "memberOf" instead)
on which I am getting "Attribute not defined" error. Shouldn't all directories necessarily include this attribute? [Get("Groups", obviously is yielding the same results]
I would appreciate if someone suggests some alternative. Ths issue would be solved if someone can suggest
1. a code to list all the members and/or direct groups under a specified group, through getex,get or idirectorysearch etc., which would be a direct answer, or
2. a script to use GetEx("group") to retrieve ONLY the immediate parent groups of a member instead of all the groups(probably by including a search scope).
Any inputs will be highly appreciated.
Thanks.