• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

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.
0
lapucca
Asked:
lapucca
1 Solution
 
SreRajCommented:
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

Featured Post

Free tool for managing users' photos in Office 365

Easily upload multiple users’ photos to Office 365. Manage them with an intuitive GUI and use handy built-in cropping and resizing options. Link photos with users based on Azure AD attributes. Free tool!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now