Active Directory nested groups?

Since you're on . NET 3.5 and up, you should check out the System. DirectoryServices.

AccountManagement (S.DS. AM) namespace. Read all about it here: Managing Directory Security Principals in the .

NET Framework 3.5 MSDN docs on System. DirectoryServices. AccountManagement Basically, you can define a domain context and easily find users and/or groups in AD.

Also: the GroupPrincipal has a method called GetMemebers which will list all members of that group - optionally, it will do so recursively for you! Set up domain context PrincipalContext ctx = new PrincipalContext(ContextType. Domain); // find the group you're interested in GroupPrincipal myGroup = GroupPrincipal.

FindByIdentity("SomeGroup"); // if you found it - get its members if (myGroup! = null) { // if your call the GetMembers, you can optionally specify a "Recursive" flag - done here var allMembers = myGroup. GetMembers(true); } The new URL1 makes it really easy to play around with users and groups in AD!

Since you're on . NET 3.5 and up, you should check out the System. DirectoryServices.

AccountManagement (S.DS. AM) namespace. Read all about it here: Managing Directory Security Principals in the .

NET Framework 3.5 MSDN docs on System. DirectoryServices. AccountManagement Basically, you can define a domain context and easily find users and/or groups in AD.

Also: the GroupPrincipal has a method called GetMemebers which will list all members of that group - optionally, it will do so recursively for you! // set up domain context PrincipalContext ctx = new PrincipalContext(ContextType. Domain); // find the group you're interested in GroupPrincipal myGroup = GroupPrincipal.

FindByIdentity("SomeGroup"); // if you found it - get its members if (myGroup! = null) { // if your call the GetMembers, you can optionally specify a "Recursive" flag - done here var allMembers = myGroup. GetMembers(true); } The new URL1 makes it really easy to play around with users and groups in AD!

Thank you for the tip on S.DS.AM. It just saved me the pain of writing a recursive program! – Richard Butterwood Jul 16 at 15:17.

Assuming you're using the LDAP view into ActiveDirectory, the attribute you're looking for is called "objectClass". A group shows up with an objectClass of "groupOfNames", I believe; possibly "group". Alternatively, just look to see if the object has any "member"s, regardless of object class, and if it does, assume it's some sort of group and recurse.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions