Troubleshooting the "403 Forbidden" Error During Exchange Hybrid Mailbox Migrations

Managing a hybrid Exchange environment comes with its challenges, and one common hurdle is encountering the "Remote Server Returned an Error (403) Forbidden" message when moving mailboxes to Exchange Online. This error typically stems from issues with the Mailbox Replication Proxy (MRS Proxy) service. Below, we’ll explore the symptoms, root causes, and step-by-step solutions to resolve this migration roadblock.

Symptoms of the Issue

When attempting to migrate mailboxes from on-premises Exchange Server to Exchange Online, you may encounter one of these errors:

  • In the Exchange Admin Center (EAC):

"The connection to the server 'mail.<DomainName>.com' could not be completed."

  • In Exchange Online PowerShell:

"The call to 'https://mail.<DomainName>.com/EWS/mrsproxy.svc' failed. Error details: The HTTP request was forbidden with client authentication scheme 'Negotiate'. The remote server returned an error: (403) Forbidden."

Understanding the Cause

The primary reason for this error is typically that the MRS Proxy service, located within the EWS (Exchange Web Services) virtual directory on your on-premises Exchange server, is not enabled. This can manifest in two ways:

  1. Explicitly Disabled: The Get-WebServicesVirtualDirectory cmdlet shows the MRSProxyEnabled property as False.
  2. Functionally Disabled: Although the cmdlet output shows MRSProxyEnabled : True, the Application log in the Event Viewer contains Event ID 1309, with a message indicating "MRS proxy service is disabled."

Resolving the Error

Here are two methods to address the disabled MRS Proxy service:

Method 1: Enable MRSProxy

This is the most direct approach if the service is explicitly disabled.

  1. Open the Exchange Management Shell on your on-premises Exchange server.
  2. Execute the following command to enable the MRS Proxy:
    Set-WebServicesVirtualDirectory "<ServerName>\EWS (Default Web Site)" -MRSProxyEnabled $true
    
    (Replace <ServerName> with the actual name of your Exchange server.)
  3. Restart Internet Information Services (IIS) to apply the change by running the command:
    iisreset
    

Method 2: Disable and Re-enable MRSProxy

This method can be helpful if the MRS Proxy appears enabled in the configuration but is not functioning correctly.

  1. Open the Exchange Management Shell.
  2. Run the following command to disable the MRS Proxy:
    Set-WebServicesVirtualDirectory "<ServerName>\EWS (Default Web Site)" -MRSProxyEnabled $false
    
  3. Wait for a few minutes.
  4. Now, re-enable the MRS Proxy using the command:
    Set-WebServicesVirtualDirectory "<ServerName>\EWS (Default Web Site)" -MRSProxyEnabled $true
    
    (Again, replace <ServerName> with your server name.)
  5. Restart Internet Information Services (IIS) by running:
    iisreset
    

In Conclusion

The 403 Forbidden error during mailbox migrations is typically a quick fix—just ensure MRS Proxy is enabled and IIS is restarted to apply changes. If you’ve encountered this issue and found alternative solutions, share your experience in the comments to help others!

For more details: Enable the MRS Proxy Endpoint for Remote Moves

  

Comments

Popular posts from this blog

Unveiling Primary Mailbox Statistics

Manage DL Members in OWA Without Allowing DL Creation – A Practical Solution

PowerShell Basics for Office 365 Administration (Episode 3)