ADFS / Office 365 / Exchange 2010 – How to force synchronization – Event ID:0, Event ID:1, Event ID:3, Event ID:4, Event ID:6126, Event ID:6127

I have created new admin account to manage Exchange 2010 SP3 / Office 365 hybrid deployment using ADFS (advanced SSO config). By default it takes up to 3 hours to sync newly created / added accounts to Office 365. To force synchronization perform:

  1. Logon to DirSync server
  2. Open Powershell module: Microsoft Online Services Module for Windows PowerShell
  3. Or you can use remote powershell if WinRM has been konfigured by running:
    Invoke-Command -ScriptBlock {Add-PSSnapin Coexistence-Configuration;Start-onlinecoexistencesync} –ComputerName <DIRSYNC server name>
  4. Run command for immediate AD synchronization:
    Start-OnlineCoexistenceSync

After running command you can check Event log if all is OK.

  1. Open application Event log and check for the following events:
  2. Event ID: 0 – Connecting to MS Online and starting Synchronization
  3. Event ID: 6127 – The management agent “SourceAD” completed run profile “Delta Import Delta Sync” with a delta import or delta synchronization step type. The rules configuration has changed since the last full synchronization
  4. Event OS: 6126 – The management agent “TargetWebService” completed run profile “Delta Confirming Import” with a delta import or delta synchronization step type. The rules configuration has changed since the last full import or full synchronization.
  5. Event ID: 1 – Import to Dirsync started
  6. Event ID: 2 – Import to Dirsync completed
  7. Event ID: 3 – Export to Office 365 started
  8. Event ID: 4 – Export to Office 365 completed

Example:

example

Default Sync interval can be changed here:

C:\program files\Microsoft Online Directory Sync\Microsoft.Online.DirSync.Scheduler.exe.Config

To run online coexistence sync for new versions of DirSync run:

Powershell.exe
Import-Module DirSync
Start-OnlineCoexistenceSync

Default path: C:\Program Files\Windows Azure Active Directory Sync\dirsync