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?
- LennartSkyKickCopper ContributorI 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."
- HidMovSteel 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.
Some context might help? You can force the user to change his password if that's what you mean.