Tip #207: Remove password expiration for O365/CRM Online

Password expiration in CRM Online is indeed a nuisance and can be changed but the maximum password expiration period configurable using Office 365 administration portal is 2 years.Like a boss meme If you intend to use O365/CRM Online for longer than 2 years, you may want to consider using Powershell tools to do it like a boss.

The following instructions are applicable to Windows 8 x64 machine and are abridged version of managing Azure AD using Windows PowerShell:

  1. Install Microsoft Online Services Sign-In Assistant
  2. Install Azure Active Directory Module for Windows PowerShell (64-bit version)
  3. Start Windows Powershell and run the following script:
    Connect-MsolService
    
    Set-MsolUser -UserPrincipalName <user ID> `
       -PasswordNeverExpires $true
    
    # The following line will do it for all users.
    Get-MSOLUser | Set-MsolUser `
       -PasswordNeverExpires $true

Leave a Reply

Your email address will not be published. Required fields are marked *