Last post Jan 06, 2014 05:32 PM by smirnov
Jan 05, 2014 03:51 PM|swamyk|LINK
I'm trying to get user's friendly domain name so I can build account name in the format of "domain\SamAccountName". I tried to parse this out from DistiguishedName of the UserPrincipal object. This seem to be working fine for the current forest but not if
the user is from different trusted forest. In my case the current forest is "Corp" and the user's forest is "NTDEV". I still get the domain in the current forest with UserPrincipal.Enabled property as false. Can somebody help me with proper way of getting
the right domain of the user? Thanks for your help!
Jan 06, 2014 05:32 PM|smirnov|LINK
Take a look at the answers at http://stackoverflow.com/questions/4249139/c-sharp-active-directory-get-domain-name-of-user