Forum Discussion
LennartSkyKick
Oct 14, 2019Copper Contributor
How to set user password expired immediately??
Hi! Is it possible to set an user's password expired immediately?
LennartSkyKick
Oct 14, 2019Copper Contributor
I am trying to test my app's error handling. One of which is handling when the user's password has expired. Specifically, I am trying to get the exception message "Authentication Error: Password has expired."
- HidMovOct 14, 2019Steel Contributor
If this is a cloud-only account you can try the following powershell to force the user to change password on next sign in:
Set-MsolUserPassword -UserPrincipalName <your user> -ForceChangePassword $true
This is what VasilMichev was talking about and should provide a the response that the password needs to be changed.