You may want to do this for select users, or more likely you want it for the same reason I use it: for an admin account used for Dirsync so the service doesn’t stop working after 2-3 months.
You will need the Windows Azure Active Directory Module for Windows PowerShell installed to do this.
Connect to MS Online:
Connect-MsolService
– Auth as an admin for your org.
Set a single user to not expire:
Set-MsolUser -UserPrincipalName <user ID> -PasswordNeverExpires $true
You can view the results with:
Get-MSOLUser -UserPrincipalName <user ID> | Select UserPrincipalName, PasswordNeverExpires
To set this for all users run the following:
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true
You can view these results with:
Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires
Note: I believe this does not work for Office 365 Small Business accounts. I do not use those so have never verified this.
Cheers