Last post Aug 13, 2009 09:52 AM by raghu1
Aug 13, 2009 06:53 AM|Adil Akhter|LINK
I am pretty new to the ldap based directory service programming using .net framework; hence have a basic silly question.
I would like to find out the all sub trees a particular user belongs to using System.DirectoryServices.Protocol.
First of all , Can a User be part of the multiple Sub Trees in “a” directory service instance? If yes, then how can I find all the sub trees that a particular user belongs to using “System.DirectoryServices.Protocol “ namespace?
To be specific about my question , given this is DN of my user object - “uid=DaffyD,OU=Ducks,OU=People,O=A “ , whether can it exist in other OU directly or indirectly? E.g.
can “OU=Ducks” be part of any other OU than “People”?
Why I want to do this ?
In our application , we can map a group or sub tree of a Directory Service to our application's group. For example, if a "OU=Ducks,OU=People,O=A" subtree is mapped to a group in our system named "SuperUser" , any user under this subtree like "DaffyD"
will be member of Group "SuperUser" in our Application. So, for some requirement , i need to find it out all the sub tree that a pariticular user could be found in a ds instance.
How can I implement it with System.DirectoryServices.Protocol? Any help is appreciated.
directory Services c#
Aug 13, 2009 09:52 AM|raghu1|LINK
Your question is confusing. The DN /ADPath / OU is not nested.
You probably mean to check the groups a user is a member of. Groupd can be nested: a group can be a member of other groups. Can you give a specific example of what you are looking for. Maybe : you want all the direct and nested memberships of a user.