Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems in retrieving attribute values through ADSI....

Status
Not open for further replies.

vcplearner

Programmer
Sep 28, 2005
10
US

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.
 
Try HYENA by system tools. Its a good tool to query AD, LDAP run reports and export data etc.
 
Thanks murali I had this problem long back and have solved it.

Its just that some attributes haven't been set up properly. I made a dump of groups of all members and worked reverse in order to get the list of members.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top