locked
How to get the friendly domain name of the user RRS feed

  • Question

  • User-1678008392 posted

    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!

    Sunday, January 5, 2014 3:51 PM

Answers