Force AD Sync

Force Azure AD Connect Synchronization

By default, it takes up to 30 minutes for your Active Directory changes to synchronize to Azure AD.

In many cases, you’d want to force AD sync. For example, forced sync is convenient if you, e.g., configured a new mail alias on proxyAddresses for a user and the user wants to start using the new alias immediately.

To force AD sync, you can use AD Users & Computers with Easy365Manager, or PowerShell.

Force AD Sync Using AD Users & Computers

The easiest way to force a synchronization of your AD changes to Azure AD is to use AD Users & Computers.

You must have Easy365Manager installed for this to work.

After making the changes to your user account that you want to replicate, select the check box in the bottom left corner of the Office 365 tab:

Clicking Apply or OK will force an AD sync immediately.

If you don’t have Easy365Manager installed, you can download a free 30-day trial here.

Force AD Sync Using PowerShell

If you don’t have Easy365Manager installed, you need to run a PowerShell CmdLet on your Azure AD Connect server to force the synchronization.

Either log in to your Azure AD Connect server or create a remote PowerShell session using the following command:

Enter-PSSession [AADC Server]

Once connected to your Azure AD Connect server you can force the synchronization using the following command:

Start-ADSyncSyncCycle -PolicyType Delta

If the synchronization of Azure AD Connect is successful, you’ll see output similar to the following:

PS C:\> Enter-PSSession dc-01.easy365manager.local
[dc-01.easy365manager.local]: PS C:\Users\adm.msk\Documents> Start-ADSyncSyncCycle -PolicyType Delta

 Result
 ------
Success

[dc-01.easy365manager.local]: PS C:\Users\adm.msk\Documents> Exit-PSSession
PS C:\>

Remember to exit the remote PowerShell session after use.

Force AD Sync Error Messages

The most common problems you’ll encounter with this command are the following:

Delta Sync Error: AAD is Busy

A busy AAD Connector will throw something like this at you:

Start-ADSyncSyncCycle : System.InvalidOperationException:
   Connector: skrubbeltrang.onmicrosoft.com - AAD is busy.
   at Microsoft.MetadirectoryServices.Scheduler.Scheduler.StartSyncCycle
   (String overridePolicy, Boolean interactiveMode)
   at SchedulerUtils.StartSyncCycle(SchedulerUtils* , Char* policyType,
   Int32 interactiveMode, Char** errorString)
At line:1 char:1
+ Start-ADSyncSyncCycle -PolicyType Delta
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError:
   (Microsoft.Ident...ADSyncSyncCycle:StartADSyncSyncCycle)
   [Start-ADSyncSyncCycle], InvalidOperationException
   + FullyQualifiedErrorId : System.InvalidOperationException:
   Connector: skrubbeltrang.onmicrosoft.com - AAD is busy.
   at Microsoft.MetadirectoryServices.Scheduler.Scheduler.StartSyncCycle
   (String overridePolicy, Boolean interactiveMode)
   at SchedulerUtils.StartSyncCycle(SchedulerUtils* , Char* policyType,
   Int32 interactiveMode, Char** errorString)
   ,Microsoft.IdentityManagement.PowerShell.Cmdlet.StartADSyncSyncCycle

The meaning of this error message is that the AAD Connector is currently synchronizing, so you’ll have to wait until it’s done.

Depending on the type of synchronization and amount of data you can just try again after waiting a few seconds.

Delta Sync Error: Azure AD Connect scheduler is unable to start

With this type of issue you’ll get an error message similar to this:

Start-ADSyncSyncCycle : System.InvalidOperationException: Azure AD Connect scheduler is unable to start
   a new sync cycle because Azure AD Connect wizard is open. Please close the wizard if it is not in use.
   at Microsoft.MetadirectoryServices.Scheduler.Scheduler.StartSyncCycle(String overridePolicy,
   Boolean interactiveMode)
   at SchedulerUtils.StartSyncCycle(SchedulerUtils* , Char* policyType, Int32 interactiveMode,
   Char** errorString)
At line:1 char:1
+ Start-ADSyncSyncCycle -PolicyType Delta
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (Microsoft.Ident...ADSyncSyncCycle:StartADSyncSyncCycle)
   [Start-ADSyncSyncCycle], InvalidOperationException + FullyQualifiedErrorId : System.InvalidOperationException:
   Azure AD Connect scheduler is unable to start a new sync cycle because Azure AD Connect wizard is open.
   Please close the wizard if it is not in use.
   at Microsoft.MetadirectoryServices.Scheduler.Scheduler.StartSyncCycle(String overridePolicy, Boolean interactiveMode)
   at SchedulerUtils.StartSyncCycle(SchedulerUtils* , Char* policyType, Int32 interactiveMode, Char** errorString),
   Microsoft.IdentityManagement.PowerShell.Cmdlet.StartADSyncSyncCycle

The meaning of this error message is that the AAD Connect wizard is open by someone. It could be yourself or one of your colleagues working in a different session to the server.

To find the culprit use the Get-Process PowerShell command:

PS C:\Windows\system32> Get-Process AzureADConnect -IncludeUserName

Handles      WS(K)   CPU(s)     Id UserName               ProcessName
-------      -----   ------     -- --------               -----------
    576     188748     2.33   2880 GIGACORP\adm.ad.jane   AzureADConnect

Or check with TaskManager:

AzureADConnect.exe

Now, that you have the name of the perpetrator who forgot to close the AAD Connect wizard, take a screenshot! It makes for good evidence who should be buying cake next Wednesday 😉

Cut Hours From AD and Office 365 Administration

Easy365Manager is an administration tool that has revolutionized how hundreds of organizations manage hybrid Office 365.

With Easy365Manager, you can manage Office 365 licenses and mailboxes as part of AD user properties.

No more switching between a handful of web consoles and PowerShell.

No more on-premises Exchange Server.

With Easy365Manager, you perform all daily tasks from the comfort of the well-known GUI in AD Users & Computers.

Watch how easy you can decommission a user account in 30 seconds (something that normally would require five to ten minutes and a handful of different tools):

Easy365Manager gives you GUI access to many semi-complex PowerShell tasks, like calendar permission management and Outlook automapping.

With Easy365Manager, you can move a lot of tasks from third-level support to first-level support.

Download your fully functional 30-day trial today.

It takes less than a minute to install, and no infrastructure changes are needed.