Azure AD Connect Force a manual Sync
How many times has this happened to you?
It’s a familiar story and it usually goes something like this. Someone comes to you and says "I need a new account created right away, we have to get this new person on email and ..."
And you would be right most of the time thinking that they have known about this person coming for a few days.
You go ahead and create this new Active Directory Account, but the Directory Synchronization between your on-premises Active Directory and Azure Active Directory runs every 30 minutes.
You are not quite out of luck because it is very easy to manual force a Directory Synchronization, and knowing how to do this ahead of time sure does come in handy.
I have a little secret that I do not want to get out, when someone asks me how long a task will take, for example creating a new user, I always give a time that is at least 3 times longer that it actual takes. It is not that I am trying to make it look like I have so much more work to do than I actually have. Creating a new account takes minutes, however there is that phone call you get that you have to take care of some other emergency, or the coworker that drops in to your office to see what your weekend plans are.
Back to creating this new user, once you have them created you can then do a manual sync and not have to wait up to 30 minutes for the on premise to sync with Azure Active Directory / Office 365.
There are different versions of the Synchronization tool. You should be running 1.1.xx at least for this to work.
• Azure AD Connect or AADConnect (the current version)
• DirSync (the original first version of Directory Synchronization).
• Azure AD Sync or AADSync.
This is the easiest way to start, login to the computer that has Azure AD Connect
Start Powershell as an administrator
You need to first import the ADSync module into your PowerShell session
You may need the full path:
Import-Module "C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\ADSync.psd1"
Your PowerShell Session will now have the ADSync commands
There are two different ways to update: full and Delta, actually there is a 3rd unspecified by omitting the -policytype.
Start-ADSyncSyncCycle -PolicyType Delta
• Delta import on all Connectors
• Delta sync on all Connectors
• Export on all Connectors
Start-ADSyncSyncCycle -PolicyType Initial
• Full Sync
• Added more objects or attributes to be imported the source directory
• Changes to the Sync rules
• Changes to filtering
Beyond that there are a few other PowerShell commands that can be helpful in managing the on premise AD to sync with Azure Active Directory / Office 365, however your new user should be synced now. If you want to see the other PowerShell commands check out my youtube video on this.
If you did not know that you could do a manual sync give it a go so the next time you need that new user account up and running you are not waiting for the Active Directory sync to Office 365.