Some of our clients sometimes need to disable their PassWord Expiration Policy. You may find yourself in the same situation. To disable this, just follow these simple steps:
Step 0 – Download and install the Microsoft Online Services Module and execute it: http://onlinehelp.microsoft.com/en-us/office365-enterprises/ff652560.aspx#BKMK_DownloadTheMOSIdentityFederationTool
Step 1 – Creates a PSCredential object using your Office 365 administrator user name and password.
$cred = get-credential

The command will prompt for your credentials. Type them in:

Step 2 – Initiate a connection to Office 365:
Connect-MsolService –Credential $cred

Step 3 - Retrieves the user from the Office 365 directory:
$user = Get-MsolUser –UserPrincipalName user@domain.com

Step 4 – Updates the user property “PasswordNeverExpires” in the Office 365 directory:
Set-MsolUser –UserPrincipalName &user.UserPrincipalName –PasswordNeverExpires $true

If you need to set this property for all users in Office 365 directory, follow steps 1 and 2 and then run the following commands:
Retrieve all users in the Office 365 directory:
$users = Get-MsolUser

Updates the property “PasswordNeverExpires” for all users in Office 365 directory:
foreach ($user in $users) {
Set-MsolUser –UserPrincipalName $user.UserPrincipalName –PasswordNeverExpires $true }

Remember that this only applies when we have not deployed Active Directory Federation Services. In that case it is our local Active Directory who is responsible for establishing this security policy.
Regards!