Which UserPrincipal property to set after enabling an AD user account so that user have to change the log in password?

Hi, I'm using VS2012.

In my code, after enabling a disabled user account, I also set the password to a default password.  Which attribute and how to set it so that user would need to change their password after they log in?

Thank you.
lapuccaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
SreRajConnect With a Mentor Commented:
Hi,

You should be setting pwdLastSet to 0. Please refer following article for more information.

http://technet.microsoft.com/en-us/library/ee198797.aspx
0
 
DeadmanIT ConsultantCommented:
Check User must change password at next logon

ad.JPG
0
 
lapuccaAuthor Commented:
Performing this by code.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.