Turn Off Password Expiry In Office 365 for education

If you’re using non-federated identities with Office 365 for education you will find that by default password expiry is enabled, meaning every 90 days you’ll be required to pick a new password. While the duration of this is not configurable, it is possible to disable the feature for some or all of your users.

Remote PowerShell

To do this you’re going to need to connect to your Office 365 tenant using remote PowerShell. Make sure you’ve downloaded the necessary PowerShell cmdlets, and familiarised yourself with them.

For an individual user:

To disable password expiry for an individual user, run the following code:

   1: Set-MsolUser –UserPrincipalName <UPNName> -PasswordNeverExpires $True 

  For example, if your user’s UPN is aylakol@contoso.edu the code would look like:

   1: Set-MsolUser –UserPrincipalName aylakol@contoso.edu -PasswordNeverExpires $True 

For all users:

To disable password expiry for all of your users, run the following code:

   1: Get-MsolUser | Set-MsolUser –PasswordNeverExpires $True 

That’s it! Now your users won’t be prompted to reset their passwords after 90 days.

If you’re looking for a more advanced scenario where your passwords are managed by your local Active Directory then take a look at federated identity in Office 365 with Active Directory Federation Services 2.0 – a server role that enables you to authenticate against your AD for access to Office 365 for education.

Comments (0)

Skip to main content