How to check Password expiry date for Dynamics CRM Online Service account

Service Accounts are used for custom integrations and not for logging directly into CRM, since Office 365 allows enforces good practice by automatically resetting Passwords every 90 Days, we need a way to keep track of when the Service Accounts will expire so that any Integrations relying on them will not break when the password expires.

First install the Microsoft Online Services Sign-In Assistant for IT Professionals RTW from the Microsoft Download Centre.


Then install the Azure Active Directory Module for Windows PowerShell (64-bit version), and click Run to run the installer package.



 1)       From Windows Start, Run the Windows Azure AD Directory Module for Powershell

2)      connect-msolservice

3)      Provide your global admin credentials

4)      Get-MsolPasswordPolicy -DomainName

5)      Ie Get-MsolPasswordPolicy -DomainName

6)      get-Msoluser -Userprincipalname <UPN> |FL

(press Tab button to set the correct case of the command to prevent typo errors)

Author: Raz Dynamics
Razwan is a Microsoft MVP and Dynamics 365 Community Moderator responsible for developing Microsoft Dynamics 365 and CRM integrated solutions for over a decade. Razwan is responsible for delivering Dynamics 365 User Groups & CRM Saturday Conferences. Raz has developed many free community utilities for Dynamics 365 and CRM which you can download from this blog.