Office 365: Disable the complexity of passwords [Quick Guide]

3:42 am October 30, 20166153

I. introduction

the policy of default passwords on Office 365 is relatively strict at the level of the prerequisites in terms of complexity, which is in itself not a bad, but can cause problems if you want to have your own policy.

The password must be at least 8 characters long and contain at least 3 of these 4 types of characters: lowercase, uppercase, numbers, and special characters.

Office 365 Administration Center does not for the moment the possibility to disable the complexity of passwords, or even to change, therefore go through PowerShell .

Note: The password expiration is the only parameter related to passwords that may be configured from the administration Office 365 Center, but also by the commandlet ‘ Set MsolPasswordPolicy “.”

In this tutorial, we will see how to disable the complexity of passwords for all users or for a single user.

II. disable the complexity for all users

If you want to disable the complexity of passwords for all users that you manage in Office 365, we’re going to rely on two commandlets: “ Get-MsolUser ‘ which allows you to list the users and” Set-MsolUser ‘ which allows to edit users.

Besides, this second commandlet includes a parameter that interests us and is called ‘ StrongPasswordRequired “can be translated share ‘password required strong.” It is through this parameter you pass to false, that the complexity will be able to be disabled.

Here’s the command:

 Get-MsolUser | Set-MsolUser - StrongPasswordRequired $false 

before you can run this command, I remind you that you must initiate a connection to Office 365 in your script, including for import of commandlets and session settings.

III. disable the complexity of passwords for a user

If you want to disable the complexity for a single user, we’ll make a selection directly from the commandlet ‘ Get-MsolUser ‘ via the parameter ‘ UserPrincipalName “.” This parameter is set the identifier to unique user who is my e-mail in Office 365.

Here’s the command:

 Get-MsolUser - UserPrincipalName "[email protected]" | Set-MsolUser - StrongPasswordRequired $false 

If you have a list of users complete to change, there are of course different ways (CSV source, table of e-mail addresses, etc…).

As I’m nice, I provides you with an example that allows you to store a list of email addresses in a variable to target users:

 $TargetUsers = @("[email protected]","[email protected]","[email protected]") $TargetUsers | ForEach-Object {Get-MsolUser - UserPrincipalName $_______ |} Set-MsolUser - StrongPasswordRequired $false} 

IV. Is the complexity active or inactive users?

To find out whether or not the complexity is enabled on your users, you can rely on the commandlet ‘ Get-MsolUser “to provide information on users Office 365.

It will select two properties: UserPrincipalName and StrongPasswordRequired which correspond respectively to the login of the user (e-mail address) and the State of complexity on this account. Here’s the command:

Get-MsolUser | Format-Table – auto UserPrincipalName, StrongPasswordRequired

a table will be displayed:


this is 🙂 now you are capable of manage complexity on your users, Office 365, whether to turn it on or turn it off, or simply list to have a State of your accounts.