Exchange Connection Problems

Fix Exchange Set-SyncMailUser Cmdlet and Remote Mailbox Errors

Aamir Naveed AkramAamir Naveed Akram Oct 29, 2026 869 views

Question details

The user needs to resolve synchronization failures with the Set-SyncMailUser cmdlet and fix errors preventing a remote mailbox from provisioning.

How to Fix Exchange Set-SyncMailUser Cmdlet and Remote Mailbox Provisioning Errors
Product
Microsoft Exchange and Microsoft Entra ID
Device & OS
not provided
Scenario
The issue occurred after moving a user account from a synchronized Active Directory OU to an unsynchronized OU, permanently deleting the user from Azure AD, and then moving the account back to synchronize again.
Observed behavior
The Set-SyncMailUser cmdlet fails, and the remote mailbox cannot be provisioned due to stale Exchange attributes or a conflicting ExchangeGUID syncing to the new Microsoft Entra ID user.
Before you start

Before making destructive changes to directory attributes, back up the user's remote mailbox information and verify their synchronization status in the Microsoft Entra Connect Synchronization Service.

Solution 1Recommended

Clear Stale Remote Mailbox Attributes and Run a Delta Sync

Use this method to safely remove conflicting Exchange attributes and an existing ExchangeGUID, allowing Microsoft Entra ID to provision the mailbox correctly.

When an Active Directory user is moved out of scope and back into a synchronized OU, Microsoft Entra ID may treat it as a new object. However, old Exchange attributes like the ExchangeGUID can persist and block the provisioning of a new mailbox. Running the Disable-RemoteMailbox cmdlet clears these attributes without deleting the local AD account.

1
Remove the Exchange Online license

Log in to the Microsoft 365 Admin Center and temporarily unassign the user's Exchange Online license.

2
Disable the remote mailbox

On your on-premises Exchange server, open the Exchange Management Shell and run 'Disable-RemoteMailbox' for the affected Active Directory user. This removes the stale remote mailbox and Exchange attributes while preserving the AD account.

3
Run a delta synchronization

Open PowerShell on your Azure AD Connect server and execute 'Start-ADSyncSyncCycle -PolicyType Delta' to force an immediate synchronization to Microsoft Entra ID.

4
Reassign the license

Once the directory changes have successfully synchronized, assign the Exchange Online license back to the user in the Microsoft 365 Admin Center.

5
Verify provisioning

Check Exchange Online to confirm that the mailbox now provisions successfully. If necessary, you can manually recreate the remote mailbox afterwards.

Clear Stale Remote Mailbox Attributes and Run a Delta Sync
Verification Tip: You can verify whether the user synchronized successfully by using the Get-AzureADUser cmdlet or by checking the inbound and outbound connectors via Metaverse Search in Azure AD Connect.
Free Microsoft Office alternative

Manage IT Documentation Efficiently with WPS Office

While WPS Office cannot directly resolve Microsoft Exchange directory synchronization issues, it is the perfect lightweight alternative for managing your IT logs, PowerShell scripts, and administrative documentation. Enjoy full compatibility with Microsoft Office formats without the expensive subscription.

  1. 1. Download WPS Office: Visit the official WPS website and download the free WPS Office installer for your operating system.
  2. 2. Document Your IT Procedures: Open WPS Writer to create comprehensive standard operating procedure (SOP) documents for handling Exchange provisioning errors.
  3. 3. Save and Share in Office Formats: Save your technical documentation as standard Word or PDF files to easily share them with your IT department.
Fully compatible with Microsoft Office formats like .docx, .xlsx, and .pptx for seamless IT document sharing.Lightweight design ensures fast loading times when accessing heavy technical manuals and server logs.Built-in PDF editing tools for creating, signing, and distributing secure administrative reports.Completely free to use for your daily IT documentation and note-taking needs.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Set-SyncMailUser cmdlet fail after moving a user's OU?

Moving a user to an unsynchronized Organizational Unit (OU) and back can cause Microsoft Entra ID to treat them as a new object. If old Exchange attributes like ExchangeGUID are still present, they create conflicts that prevent the cmdlet from executing successfully.

How can I check if an Active Directory user synchronized to Entra ID successfully?

You can run the Get-AzureADUser PowerShell cmdlet to verify the user object. Alternatively, open the Azure AD Connect Synchronization Service, go to Metaverse Search, and check the inbound and outbound connectors for the specific user.

Will running Disable-RemoteMailbox delete my on-premises Active Directory account?

No. The Disable-RemoteMailbox cmdlet only clears the remote mailbox configuration and associated Exchange attributes. Your local Active Directory user account remains fully intact.