Click here to Skip to main content
15,906,626 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am able to get the user details from ADS. But unable to Set password to user. The ADS is in another server. If i pass the ADS server administrator user name and password. Then I am able to set the password. But how to do without passing the ADS server user name and password.
Posted

1 solution

Hi,
I tried to reset the password. Using setPassword. But I changed using the old password.
PrincipalContext PrincipalContext = new PrincipalContext(ContextType.Domain, ConfigurationManager.AppSettings["ADSServerIP"].ToString(), userpath);
UserPrincipal User = UserPrincipal.FindByIdentity(PrincipalContext, userid);
User.ChangePassword(strOldPassword, newpassword);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900