User Manual

Managing Exchange Server migration within a hybrid environment

You are using an AD synchronization tool such as Azure Active Directory Connect or Azure AD Sync to sync the data within your hybrid Exchange environment and would like to configure certain attributes for performing on-premise migration.

Resolution:

For performing on-premise Exchange migration within your hybrid environment, you need to set the attribute msExchMailboxGuid to NULL. Follow the steps outlined below to configure the attribute status.

Set the attribute msExchMailboxGuid to NULL

  1. Use the following cmdlet to stop the scheduler in Azure AD Connect.

    Set-ADSyncScheduler -SyncCycleEnabled $false

  2. Run the Synchronization Rules Editor tool from the Start menu as administrator as shown.

    Synchronization Rules Editor

  3. Select the option Inbound under Direction and choose the rule In from AD - User Exchange. Note down the Precedence value corresponding to this row and click on the Edit button below to edit the rule.
  4. Click Yes to disable the rule and create a copy of the rule. Under Descriptions, change the value of the Precedence to 200.
  5. In the Transformations tab look for the attribute msExchMailboxGuid and set the following values.
    • Under Flow Type->Select Expression
    • Under Source, corresponding to this row-> Select NULL
    • Select the checkbox Apply Once
    • Under Merge Type->Select Update.
    • Click Save after configuring the above changes and delete the rule that you disabled in Step 4.

    Change the Precedence value in this rule to the one you noted down under Step 3.

  6. Use the following command to restart the scheduler you had turned off in Step 1.

    Set-ADSyncScheduler -SyncCycleEnabled $true

  7. Use the following command to perform a full synchronization.

    Start-ADSyncSyncCycle -PolicyType Initial

    After performing the synchronization, you can perform migration within your hybrid environment by creating mailboxes and assigning licences to your Office 365 account.

Remove the attribute msExchMailboxGuid from the AD synchronization

If the aforementioned solution is not working for you, you can try removing the synced users manually from Office 365 or remove the attribute msExchMailboxGuid to remove the synced users in Office 365.

Remove Synced users from Office 365

  1. Open Synchronization Service Manager in Azure AD Connect.
  2. Select the Connectors tab.
  3. Select Active Directory Domain Services as the connection type.
  4. Right click and select Properties
  5. From the Properties window, head over to the Configure Directory Partitions and click on Containers.
  6. Enter the password of the local AD user and click OK.
  7. In the Select Containers window, uncheck the selection for HybridUsers and click OK.
  8. To do a full AD synchronization, open Windows PowerShell command and execute the command below.

    Start-ADSyncSyncCycle -PolicyType Initial

  9. Open Synchronization Service Manager and verify if the status of the connectors are successful. You can view the synced accounts under the Deleted Users page of the Office 365 admin center. Finally, you can delete the users from the Azure AD admin center.

    Synchronization Service Manager

  10. After deleting the users from the Azure AD admin center there will be no synchronized accounts which you can verify from the Office 365 admin center. If you would like to know how to delete the users from Azure AD, follow the steps below.

Steps to delete users from Azure AD admin center

  • Login to Azure AD admin center from this link.
  • Select Users from the left pane and navigate to Deleted users.

     Select Deleted users from the Azure Admin center

  • Select the users you want to delete and click the button Delete permanently to permanently delete all the users. Click Yes to confirm.

Configure AD Sync Tool to exclude the attribute msExchMailboxGuid from sync

You can prevent the attribute msExchMailboxGuid from syncing every time by following the steps below.

  1. Open Azure AD Connect app.
  2. Click on Configure and choose Custom synchronization options from the list. Click Next.
  3. Enter your Azure credentials under Connect to Azure AD.
  4. In the Domain / OU Filtering tab select the option HybridUsers and click on the Next button at the bottom.
  5. In the Azure AD Attributes tab, uncheck the option msExchMailboxGuid and check the option I want to further limit the attributes exported to Azure AD and click on the Next button.
  6. In the Configure tab, check mark the option Start the synchronization process when configuration completes.
  7. Click on the Configure button to start the synchronization. After the synchronization is complete, the attribute msExchMailboxGuid is no longer synced to the user accounts.