How to Upgrade AADSync when configured for SQL Server
Everytime there’s a new version released of Azure Active Directory Synchronization tool (AADSync), you’d want to install the latest version in order to get the fixes and other features it may include. In a normal scenario when you’ve installed AADSync without running the command line setup to configure it for running against a SQL Server, you’d simply just run the MicrosoftAzureADConnectionTool.exe and click Upgrade in the wizard. However, when you’ve configured AADSync to use a SQL Server, the upgrade scenario is a bit different.
In this post I’ll go through the necessary steps to take in order to upgrade AADSync when configured to use a SQL Server. Begin with downloading the latest version of AADSync, and when writing this the latest version can be downloaded from the following link:
1. Download the latest version of AADSync.
2. Run the MicrosoftAzureADConnectionTool.exe executable and let it extract itself.
3. When presented with the Upgrade Azure AD Sync window, close it.
4. Open an elevated command prompt and browse to the following location:
C:\Program Files\Microsoft Azure AD Connection Tool
5. Run the following command:
DirectorySyncTool.exe /SQLServer localhost /SQLServerInstance SQLEXPRESS /ServiceAccountDomain CONTOSO /ServiceAccountName AADSync_SA /ServiceAccountPassword YOURPASSWORD
Remember to change the value of the following parameters to reflect your environment setup:
6. Now the Upgrade Azure AD Sync window appears again, accept the license terms and click Upgrade.
7. Wait for the wizard to upgrade AADSync, it takes a couple of minutes.
8. Once the upgrade has successfully completed, the wizard will let you re-configure any previous configuration by letting you step through the different configuration steps once more. Unless you want to make any changes, simply just step through the wizard and finally click Finish.
9. Open Synchronization Service and click on Help -> About. You should now see that the latest version has been installed:
10. Make sure that the Azure AD Sync Scheduler scheduled task has been re-enabled after you’ve successfully gone through the wizard.
11. Run the Azure AD Sync Scheduler scheduled task and let it complete. Follow the progress in Synchronization Service UI in the Progress view. If you see any messages like:
Go to the Connectors view, right-click the connector showing the above message in the status column and select Properties. Click OK in the Properties window. This process will update the interfaces and when you run the scheduled task again to synchronize, it should now show success instead of the message above.
You’ve now successfully upgrade AADSync! I hope this helps.
Chief Technical Architect and Enterprise Mobility MVP since 2016. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows devices and deployments including automation. Awarded as PowerShell Hero in 2015 by the community for his script and tools contributions. Creator of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService to name a few. Frequent speaker at conferences and user groups.