In this TechTip, we’ll address the issue of how to configure your users’ passwords to never expire in Office 365. This is a question that I get with some consistency, and it deserves some attention because it’s not as simple as pointing and clicking. (It bears mentioning that you CAN change the password expiration policy from within the Microsoft Online Portal, but you’re limited to a maximum of 730 days.)
**NOTE: Making your password policies lax to the point of not enforcing a password expiry is a BAD security practice, and I DO NOT recommend doing so. That having been said…
First thing you’re going to want to do is make sure that your computer is set up and configured properly to use Powershell and connect it to Office 365. After that, you will also want to ensure that you’ve set up the Windows Azure AD modules for Powershell.
Following the steps in the third link, you’re going to want to connect to Azure by firing up Powershell and using the following commands (make sure you’re using administrator credentials!):
$365Creds = Get-Credential
Connect-MsolService -Credential $365Creds
Once you’re connected, you can apply the policy to an individual user, or to all users by typing in (or copy/pasting) the following commands:
|Individual user||All users|
That’s all there is to it! It’s important to note that making the change in Powershell WILL NOT reflect in MOP – the portal will still retain whatever value it was originally set to. The reason for this is because the “All Users” change in Powershell only applies to the current users in your tenant. Any new users created will have the policy in MOP applied to them.