المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Framework 3.5 AccountManagement



C# Programming
05-07-2009, 09:22 PM
I cannot find much on this.. but I am looking to get the Department and Company field from active directory... here is what I have:


PrincipalContext adPrincipalContext = new PrincipalContext(ContextType.Domain, "********");
UserPrincipal findUser = UserPrincipal.FindByIdentity(adPrincipalContext, Name);
return findUser.EmailAddress;


Now I can get the email address just fine.. but I do not see anything for UserPRincipal in getting the Department and Company fields?