Sharing a small TIP for admins searching a way to force password change without updating existing password.
There are number of ways to apply force password change for office 365 users but all those ways update existing password.
Number one way that comes to everyone mind is AzureAD PowerShell module but this way will force the password change but will also ask to set the password.
Set-AzureADUserPassword -ObjectId “26na9921-f093-4789-9bcd-19e235a6b3e” -ForceChangePasswordNextLogin:$true
Our old MSOnline powershell Module will come to rescue again.
Here is the command:
Set-MsolUserPassword -UserPrincipalName juser@techwizard.cloud -ForceChangePassword:$true
Note: This will also not work as it changes the existing password.
Here is what will work, and user old password will remain intact. (-ForceChangePasswordOnly:$true)
When user will enter the old password, He/she will be prompted to update the password.
Set-MsolUserPassword -UserPrincipalName juser@techwizard.cloud -ForceChangePassword:$true -ForceChangePasswordOnly:$true
Thanks for reading…………
Tech Wizard
Just thought since the Azure AD Graph behind Set-MsolUserPassword is going away soon I’d share there is a way to do this now with MS Graph.
https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/1090