Hi, 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?
If a user belongs to “only” a particular sub tree, then I guess I can find all the DN of the sub tree from the DN of the user. Please let me know if there is any other efficient way?
Update:
Thanks you guys for your quick replies. 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”?
Then my next question, without doing some kind of string manipulation of user’s DN , can I somehow find the names of parent nodes’ DN that this user using System.DirectoryService.Protocol efficiently?
Regards,
Adil