Hello,
- I have a AD lightweight instance for testing purposes running on a windoows server 2008 R2
- Created an AD structure that contains a container called Roles
- container Roles contains a bunch of groups (A, B and C)
- Binded a windows security principal (USER) to one of the groups (group A)
Added group A to group B as a member (by adding its DN) ~ I figured that would nest group A under B
Authenticated USER running an application from a client. (all coding is in C#)
So now what I'd like to do is the following:
------from the client all I have is the username/password of USER. But I do not have its DN. How do I figure that out?
------figure out all the groups that USER is a member of (including parents of their immediate groups)
Any tips you can assist me with for steps 8 and 9 that would be great!
someone mentioned I could use the following for number 9:
dsquery user -samid (user login ID) |dsget user -memberof -expand | dsget group -samid
But I'm coding in C# and not sure what to do with that query.
Regards