skip to Main Content

Move Azure AD Connect to new tenant

We have an existing Azure AD Connect synchronization with Microsoft 365 tenant. We did create a new Microsoft 365 tenant, and we like to move Azure AD Connect to the new tenant. This means that the existing on-premises organization with Azure AD Connect will sync to the new Microsoft 365 tenant.

Before you start

It’s good to check how it looks at the current stage before we disassociate Azure AD Connect from current Office 365/Microsoft 365 tenant and move to new Office 365/Microsoft 365 tenant.

Check Microsoft 365 admin center Active users

Sign in to the existing Microsoft 365 admin center. The existing Microsoft 365 tenant name is EXOIP. All the users in the Microsoft 365 admin center are in sync with on-premises Active Directory.

Move Azure AD Connect to new tenant 01

Check Microsoft 365 admin center Azure AD Connect sync status

In the menu, click on Home. We can see the User management tile. Azure AD Connect sync status and password sync both have a green checkmark.

Move Azure AD Connect to new tenant 02

Check Azure AD Synchronization Service Manager status

Log in to the Azure AD Connect on-premises server. Start Azure AD Synchronization Service Manager. The Synchronization Service Manager shows the status success. The sync is working perfectly fine.

Move Azure AD Connect to new tenant 03

We did check that the sync works from on-premises AD to existing Microsoft 365 tenant. In the next steps, we will move Azure AD Connect to new tenant step by step.

Move Azure AD Connect to new tenant

Follow the step-by-step approach to disconnect from existing Office 365/Microsoft 365 tenant and move to new Office 365/Microsoft 365 tenant.

Step 1: Stop Azure AD Connect synchronization scheduler

Stop Azure AD Connect synchronization scheduler with the Set-ADSyncScheduler cmdlet.

PS C:\> Set-ADSyncScheduler -SyncCycleEnabled $False

Step 2: Check Azure AD Connect synchronization stopped

Verify that Azure AD Connect synchronization stopped after running the cmdlet in the previous step. Run Get-ADSyncScheduler cmdlet. Look at the object SyncCycleEnabled. It will show the value False.

PS C:\> Get-ADSyncScheduler


AllowedSyncCycleInterval            : 00:30:00
CurrentlyEffectiveSyncCycleInterval : 00:30:00
CustomizedSyncCycleInterval         :
NextSyncCyclePolicyType             : Delta
NextSyncCycleStartTimeInUTC         : 4/28/2021 7:48:01 PM
PurgeRunHistoryInterval             : 7.00:00:00
SyncCycleEnabled                    : False
MaintenanceEnabled                  : True
StagingModeEnabled                  : False
SchedulerSuspended                  : False
SyncCycleInProgress                 : False

Step 3: Create OU in Active Directory

Start Active Directory Users and Computers on-premises. Create an OU and give it the name Empty. Make sure that there are no objects in that OU.

Move Azure AD Connect to new tenant 04

Step 4: Customize synchronization options

Start Azure AD Connect. Click Configure.

Move Azure AD Connect to new tenant 05

Click Customize synchronization options. Click Next.

Move Azure AD Connect to new tenant 06

Enter the existing Azure AD global administrator credentials. Click Next.

Move Azure AD Connect to new tenant 07

Click Next.

Move Azure AD Connect to new tenant 08

Select ONLY the Empty OU, which you did create in the previous step. Click Next.

If you don’t select an OU, Azure AD Connect will not sync. You have to select an OU.

Move Azure AD Connect to new tenant 09

Click Next.

Move Azure AD Connect to new tenant 10

Check the checkbox Start the synchronization process when configuration completes. Click Configure.

Move Azure AD Connect to new tenant 11

Configuration did complete. Click Exit.

Move Azure AD Connect to new tenant 12

Step 5: Disable Azure AD Connect deletion threshold

Read more in the article: Stopped deletion threshold exceeded – Azure AD Connect.

Look in the Synchronization Service Manager. Do you get the status stopped-deletion-threshold-exceeded? Follow the steps below. If not, go to the next step.

Move Azure AD Connect to new tenant 13

Run PowerShell as administrator. Run the Get-ADSyncExportDeletionThreshold cmdlet to check both the objects DeletionPrevention and TresholdCount.

PS C:\> Get-ADSyncExportDeletionThreshold

DeletionPrevention ThresholdPercentage ThresholdCount
------------------ ------------------- --------------
                 1                   0            500

Disable Azure AD Connect sync export deletion threshold with the Disable-ADSyncExportDeletionThreshold cmdlet.

PS C:\> Disable-ADSyncExportDeletionThreshold

DeletionPrevention ThresholdPercentage ThresholdCount
------------------ ------------------- --------------
                 0                   0            500

Step 6: Force Azure AD Connect to sync

Force a full Azure AD Sync.

PS C:\> Start-ADSyncSyncCycle -PolicyType Initial

 Result
 ------
Success

Look in Azure Synchronization Service Manager that it did run a full sync and the export is successful.

Move Azure AD Connect to new tenant 14

Step 7: Check users removal from Microsoft 365

Only the On-Premises Directory Synchronization Service Account is visible, and the Microsoft 365 account. You will see more objects if you did create them in the cloud.

Move Azure AD Connect to new tenant 15

Step 8: Uninstall Azure AD Connect

Read more in the article: Uninstall Azure AD Connect.

On the Azure AD Connect server, click on Start > Control Panel > Programs and Features. Click on Microsoft Azure AD Connect and press on Uninstall.

The wizard will uninstall the supporting components: Microsoft Azure AD Connect Health agent for sync, Microsoft Azure AD Connect synchronization services, and Microsoft SQL Server.

Move Azure AD Connect to new tenant 16

The Uninstall Azure AD Connect wizard shows up. Check the checkbox Also uninstall supporting components. Click Remove.

Move Azure AD Connect to new tenant 17

Give it a couple of minutes, and you will see the green checkmarks. Azure AD Connect is successfully uninstalled. Click Exit.

Move Azure AD Connect to new tenant 18

Azure AD Connect is removed from the Programs and Features list.

Move Azure AD Connect to new tenant 19

Start File Explorer. Go to C:\Program Files. Right-click Microsoft Azure AD Sync folder and click on Delete to remove Microsoft Azure AD Sync folder.

Move Azure AD Connect to new tenant 20

In File Explorer, navigate to the C:\Users folder. Remove the AAD_ folders. You may see folders with the prefix ADSyncMSA_. If so, remove these — more information about the ADSync service account.

Move Azure AD Connect to new tenant 21

Step 9: Remove custom domain from old tenant

Click in Microsoft 365 admin center menu on Setup > Domains. Set the onmicrosoft.com domain as default.

Move Azure AD Connect to new tenant 22

Remove the domain from the existing tenant.

Move Azure AD Connect to new tenant 23

Click on Remove domain.

Move Azure AD Connect to new tenant 24

That’s how it will look after you remove the domain.

Move Azure AD Connect to new tenant 25

Step 10: Add custom domain in new tenant

Log in to the new Microsoft 365 admin center. The new Microsoft 365 tenant name is EXOIP NEW. In the menu, go to Settings > Domains and add the domain to the tenant.

Move Azure AD Connect to new tenant 26

Step 11: Install and configure Azure AD Connect

Read more: Install and configure Azure AD Connect.

Go to the server where you uninstalled Azure AD Connect. Download the latest Azure AD Connect and run the setup. Make sure to enter the new Azure AD global administrator credentials.

Move Azure AD Connect to new tenant 27

You can sync all domains and OUs. In our example, we will only sync the Company OU and sub-OUs.

Move Azure AD Connect to new tenant 28

Finish the Azure AD Connect installation wizard.

Verify your work

The Synchronization Service Manager shows that the sync did go with success. It did add the on-premises AD objects to Azure AD.

Move Azure AD Connect to new tenant 29

Verify the users in Microsoft 365 admin center.

Move Azure AD Connect to new tenant 30

Everything looks great!

The next step is to assign Office 365 licenses with Azure group-based licensing.

Conclusion

In this article, you learned how to move Azure AD Connect to new tenant. Follow the step-by-step guide to disconnect Azure AD Connect sync with existing tenant and configure Azure AD Connect with new tenant.

Did you enjoy this article? You may also like Upgrade Azure AD Connect. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *