Set passwords to NOT expire on Microsoft Office365

For some reason this cannot be done in the Office365 Administration Portal — so here is how you do it

Michael Randrup
Developers, Developers, Developers

--

Often you need to have some specific ‘system’ accounts running Office 365. For example, if you need to send out emails from an info@mycompany.com account through Microsoft Exchange Online, you will need an Office365 account to send the email from.

When you use these ‘special purpose’ accounts, it is not very handy, if you have to change the passwords every 30 or 60 days. What you need is an account where the password does not expire.

This quick post is just to relieve you of the pain of finding out how to do it for yourself.

Prerequisites

First you need to download and install a bit of software on the machine where you want to make the configuration.

Windows Azure Active Directory Module for Windows PowerShell

  1. Go to this page on Microsoft TechNet: http://aka.ms/aadposh
  2. Scroll down to the Install the Windows Azure AD Module section
  3. Click on either the 32-bit or 64-bit Download link and run the .msi installer file

Microsoft Online Services Sign-In Assistant for IT Professionals RTW

  1. Go to this page on Microsoft Downloads: http://www.microsoft.com/en-us/download/details.aspx?id=41950
  2. Click on the Download link and install the Sign-In assistant

Performing the configuration

With the two small software bits installed, you can now perform the configuration.

Launch the Windows Azure AD Module for Windows PowerShell app
The installation above should have left you with a short-cut on your Desktop, otherwise just search for “PowerShell” and launch it from the search results.

The installed Windows AD Directory module in the Windows search results

Type the command Connect-MsolService and press ENTER

Connect to Office365

The sign-in assistant will start up and prompt you for login details. Type the user name and password for a user that has ‘Administrator’ rights for your Office365 organization.

Use an admin account so you have right to change the policy

You are now authenticated in your Office365 portal. Now you can go ahead and disable the password expiration for the users you need. To disable the expiration policy type the following command and press ENTER:

Set-MsolUser -UserPrincipalName <User name of the User> -PasswordNeverExpires $true

Disable the password expiration policy

That’s it!

Have a Nice DOS ☺

 by the author.

--

--

Michael Randrup
Developers, Developers, Developers

Child of the computer revolution of the 80's Interests: Innovation Forward Thinking Pragmatism Alternative views Software as an art and a lifestyle