Synchronizing on-premises Active Directory passwords with Microsoft 365/Azure AD (Entra ID) ensures users have a unified sign-in experience across cloud and on-prem apps. Implementing Active Directory password sync helps prevent password mismatches, reduces help-desk calls, and improves security in hybrid identity environments.
This guide explains how to perform password sync using two methods:
ADSelfService Plus offers a simple GUI-based way to sync Active Directory passwords to Microsoft 365 in real time—no need to manually run a PowerShell AD sync command.
Once enabled, ADSelfService Plus automatically pushes AD password changes to Microsoft 365 as soon as they occur.
Use Windows PowerShell or PowerShell ISE with admin privileges.
To install and import the Azure AD PowerShell module:
Install-Module AzureAD
Import-Module AzureAD This module is required to connect Azure AD PowerShell and modify tenant sync settings.
Run:
Connect-AzureAD You'll be prompted to sign in with your Office 365/Azure tenant admin account.
This step is mandatory any time you need to run an Azure AD PowerShell command.
Use this PowerShell AD sync command to turn on password hash sync:
Set-MsolDirSyncFeature -Feature PasswordSync -Enable $true If you need tenant information first:
Get-MsolCompanyInformation Azure AD Connect automatically syncs every 30 minutes.
To manually start a sync, use this AD sync PowerShell command:
Start-ADSyncSyncCycle -PolicyType Delta For a full sync:
Start-ADSyncSyncCycle -PolicyType Initial Start-ADSyncSyncCycle -PolicyType Delta Set-ADSyncScheduler -SyncCycleEnabled $true Get-MsolDirSyncFeature -Feature PasswordSync $cred = Get-Credential
Connect-AzureAD -Credential $cred Uninstall-Module AzureAD
Install-Module AzureAD
Set-MsolDirSyncFeature -Feature PasswordSync -Enable $true | Parameter | Description |
|---|---|
| -Enable | Indicates whether the specified DirSync features are turned on for the company. |
| -Features | Specifies which DirSync features to enable or disable (e.g., PasswordSync). |
| -Force | Forces the command to run without asking for confirmation. |
| -TenantId | Specifies the tenant ID on which the operation is performed; useful for Azure AD and MSOnline scenarios. |
Although PowerShell is powerful, relying solely on them can introduce challenges:
ADSelfService Plus provides a simplified, automated, GUI-based alternative to PowerShell. Instead of writing scripts, admins can manage password synchronization visually through the portal.
Use the following command to force password synchronization:
Start-ADSyncSyncCycle -PolicyType DeltaThis syncs only changes made since the last sync.
The sync status can be checked by running the command below. This will display the last sync time and next scheduled sync.
Get-ADSyncScheduler Ensure Azure AD Connect is installed and configured. Then, enable synchronization using the command below.
Set-ADSyncScheduler -SyncCycleEnabled $true