Force password reset at next logon for all users in Azure AD

Force password reset at next logon for all users in Azure AD

There comes a time that you want to force a password reset for all or a group of users in the organisation.
This task is easy to accomplish using Powershell with the MSonline module.

Command to force it for all users (be careful using this since it can also hit admin and or service accounts):

Get-MsolUser -All | Set-MsolUserPassword -ForceChangePasswordOnly $true -ForceChangePassword $true

Command to point it to a specific user (Test the outcome of this command first before doing it for the whole organisation):

Get-MsolUser -UserPrincipalName “username@yourdomainname.nl” | Set-MsolUserPassword -ForceChangePasswordOnly $true -ForceChangePassword $true

Leave a Reply