Password never expire in Office 365

When creating user accounts and Mailboxes in Office 365 the default Microsoft password policy is applied, which means you have to change your password every 90 days.

While it is a best practice to change your password on a regular basis not every customer is too happy with this. I can think of one exception and that’s a service account, this makes sense to have the password set to never expire.

To change this option for user accounts in Office 365 you have to use the Windows Azure Active Directory PowerShell module to connect to Office 365 using the following commands:

$msolcred = get-credential

connect-msolservice -credential $msolcred

To set the password to never expire for user jaap@contoso.nl you can use the following command:

Set-MsolUser -UserPrincipalName jaap@contoso.nl -PasswordNeverExpires $true

And to change it for all users in the entire Office 365 tenant you can use the following command:

Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

image

For more information regarding managing Azure Active Directory using PowerShell you can visit the following Microsoft site: Manage Azure AD using Windows PowerShell.

5 thoughts on “Password never expire in Office 365”

  1. Even though that some customers do not like to change a password on a regular basis, the Office 365 password policy should be seen as an opportunity to get customers used to this procedure. Excluding accounts from the password policy should be used for service accounts only.

    Like

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s