Skip to content

Instantly share code, notes, and snippets.

@scruffydan
Created November 14, 2017 19:41
Show Gist options
  • Save scruffydan/54d7cd230180e324c33f1821f867d41a to your computer and use it in GitHub Desktop.
Save scruffydan/54d7cd230180e324c33f1821f867d41a to your computer and use it in GitHub Desktop.
Fix Azure AD sync passwords not syncing
# Steps:
# Run command in PowerShell on the DirSync server. ($adConnector and $aadConnector are found in Connectors tab in Synchronization Service Manager)
# Perform Full Sync command in PowerShell.
# Azure AD Password toggle:
$adConnector = "<CASE SENSITIVE AD CONNECTOR NAME>"
$aadConnector = "<CASE SENSITIVE AAD CONNECTOR NAME>"
Import-Module adsync
$c = Get-ADSyncConnector -Name $adConnector
$p = New-Object Microsoft.IdentityManagement.PowerShell.ObjectModel.ConfigurationParameter “Microsoft.Synchronize.ForceFullPasswordSync”, String, ConnectorGlobal, $null, $null, $null
$p.Value = 1
$c.GlobalParameters.Remove($p.Name)
$c.GlobalParameters.Add($p)
$c = Add-ADSyncConnector -Connector $c
Set-ADSyncAADPasswordSyncConfiguration -SourceConnector $adConnector -TargetConnector $aadConnector -Enable $false
Set-ADSyncAADPasswordSyncConfiguration -SourceConnector $adConnector -TargetConnector $aadConnector -Enable $true
# Azure AD full sync:
Start-ADSyncSyncCycle -PolicyType Initial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment