Office 365 Service Accounts

A quick short blog post, which is really just a direction to some Microsoft content. Office 365 users will be familiar with the need for an account to use as a “service account” for DirSync, Azure AD Sync or other 3rd Party Sync/Integration Services. Now, how frustrating is it when this stops working because the account password expires – stopping your services working.

Of course, following best practice, you will want to ensure that your normal users keep whatever password policy you have defined – but how about setting just the “service account” password not to expire.

Its much simpler than you think! This Microsoft support article (and video tutorial – a nice new method there) will walk you through it.


In reality, you only need 2 commands:

1. Connect-MsolService
2. Set-MsolUser -UserPrincipalName <> -PasswordNeverExpires $true

Job done! Over the next few weeks – I’m going to try and put together a series of common PowerShell commandlets you can use to manage and customise your Office 365 use. If you have any scenarios you would like to see – you can tweet them to @thescarfedone or reply to this post.






Leave a Reply

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