mpemberton
Programmer
Here's what I've got in AD:
Domain -> OU1 -> OU2 -> Users
When I authenticate a user, I get the "distinguishedname" property back with "CN=username,OU=OU2,OU=OU1,DC=Domain,DC=com". Here's what I want.
1) Is there any way I can parse out (easily) what is the lowest OU for this user (which would be OU2 in this instance)?
2) To follow up question 1, does the distinguishedname property provide the info in the correct reverse order (assuming I might have to parse it myself)?
3) Is there another way to retrieve the lowest OU for the authenticated user?
Thanks for anyone's help with this. I've tried to resolve this for several days, and don't have any hair left....
Mark
Domain -> OU1 -> OU2 -> Users
When I authenticate a user, I get the "distinguishedname" property back with "CN=username,OU=OU2,OU=OU1,DC=Domain,DC=com". Here's what I want.
1) Is there any way I can parse out (easily) what is the lowest OU for this user (which would be OU2 in this instance)?
2) To follow up question 1, does the distinguishedname property provide the info in the correct reverse order (assuming I might have to parse it myself)?
3) Is there another way to retrieve the lowest OU for the authenticated user?
Thanks for anyone's help with this. I've tried to resolve this for several days, and don't have any hair left....
Mark