Global groups within group groups - how do i get member list

Global groups within group groups - how do i get member list

Post by Joe Richards [MVP » Mon, 18 Nov 2002 09:24:24



Nothing in the languages will do that for you, you will need to do your own
walking (i.e. recursion). BTW, be wary of people who do circular nesting...

--
Joe Richards
www.joeware.net
---


Quote:> How do i determine the effective member list of a global
> group that only has global groups assigned. For example,

> GlobalGroup1
>    has GlobalGroup2 as a member group

> GlobalGroup2
>    has Tom
>    has Mary

> I would like to call somthing that allows all the users
> of GlobalGroup1 to be returned, (ie get AD to walk the
> directory for me an return Tom and Mary.

> I was hoping the isMember would walk the directory as
> follows but no luck either.

> LPWSTR adsPath = L"WinNT://Sample/GlobalGroup1";
> hr = ADsGetObject(adsPath,IID_IADsGroup,(void**)&pGroup);
> VARIANT_BOOL inG=false;
> hr = pGroup->IsMember(L"WinNT://Sample/Tom", &inG);
> will return false since Tom is not a direct member,
> however he is indirectly.

> Thanks in advance.

 
 
 

Global groups within group groups - how do i get member list

Post by Todd Warne » Mon, 18 Nov 2002 10:10:00


Too bad since i would rather the AD do the work and not
me. Thanks for the information and thanks for the tip
about the circular nesting, forgot about the potential
for that one....

>-----Original Message-----
>Nothing in the languages will do that for you, you will
need to do your own
>walking (i.e. recursion). BTW, be wary of people who do
circular nesting...

>--
>Joe Richards
>www.joeware.net
>---


message

>> How do i determine the effective member list of a
global
>> group that only has global groups assigned. For
example,

>> GlobalGroup1
>>    has GlobalGroup2 as a member group

>> GlobalGroup2
>>    has Tom
>>    has Mary

>> I would like to call somthing that allows all the users
>> of GlobalGroup1 to be returned, (ie get AD to walk the
>> directory for me an return Tom and Mary.

>> I was hoping the isMember would walk the directory as
>> follows but no luck either.

>> LPWSTR adsPath = L"WinNT://Sample/GlobalGroup1";
>> hr = ADsGetObject(adsPath,IID_IADsGroup,(void**)
&pGroup);
>> VARIANT_BOOL inG=false;
>> hr = pGroup->IsMember(L"WinNT://Sample/Tom", &inG);
>> will return false since Tom is not a direct member,
>> however he is indirectly.

>> Thanks in advance.

>.


 
 
 

Global groups within group groups - how do i get member list

Post by Joe Richards [MVP » Tue, 19 Nov 2002 01:20:04


Yep, it would be nice to have an easier way but there isn't currenly one.
Just like getting the group memberships of users in domains other than the
domain they exist in, that is a fun thing to do as well.

In the meanwhile, search this newsgroup as there are postings with recursion
logic and methods of handling the circular nesting already posted as this
has been a popular topic. Basic the method around recursion is to use a hash
and store the groups already checked out in that hash. With C++ I have used
the STL tool "map" to set up the hash.

--
Joe Richards
www.joeware.net
---


> Too bad since i would rather the AD do the work and not
> me. Thanks for the information and thanks for the tip
> about the circular nesting, forgot about the potential
> for that one....

> >-----Original Message-----
> >Nothing in the languages will do that for you, you will
> need to do your own
> >walking (i.e. recursion). BTW, be wary of people who do
> circular nesting...

> >--
> >Joe Richards
> >www.joeware.net
> >---


> message

> >> How do i determine the effective member list of a
> global
> >> group that only has global groups assigned. For
> example,

> >> GlobalGroup1
> >>    has GlobalGroup2 as a member group

> >> GlobalGroup2
> >>    has Tom
> >>    has Mary

> >> I would like to call somthing that allows all the users
> >> of GlobalGroup1 to be returned, (ie get AD to walk the
> >> directory for me an return Tom and Mary.

> >> I was hoping the isMember would walk the directory as
> >> follows but no luck either.

> >> LPWSTR adsPath = L"WinNT://Sample/GlobalGroup1";
> >> hr = ADsGetObject(adsPath,IID_IADsGroup,(void**)
> &pGroup);
> >> VARIANT_BOOL inG=false;
> >> hr = pGroup->IsMember(L"WinNT://Sample/Tom", &inG);
> >> will return false since Tom is not a direct member,
> >> however he is indirectly.

> >> Thanks in advance.

> >.

 
 
 

1. Getting the list of groups in which a user/group is a member.

Hi,

I am using vb.NET to access my AD Domain. I would like to
list the groups in which a user/group is a member.

I know that this can be easily done with "memberOf"
method of the user/group in VB6. but, i tried lot of
things to do it in VB.NET. i tried using the native
object, "Invoke" method of Directoryentry object.

So, if somebody can help with a hint or work around to
this, i will appreciate it.

Thanks
--Jay

2. Bibtex label help

3. Enumeration of global groups member of another group...

4. building a vxworks image

5. Getting the groups a user is a member of doesn't work for hierarchical groups

6. Invalid Media Type (Arrrgggh!)

7. Groups within Groups

8. Entropy encoding of english

9. Recursive groups within a group in VB

10. Adding Global groups to local groups

11. Adding Global Groups to Local Groups

12. Obtain domain info of global groups in local groups

13. urgent: nested groups aren't in the members property of the parent group!