Jan 2 2018

The InnerException message was ‘Maximum number of items that can be serialized or deserialized in an object graph is ‘2000000’.

This was quite an interesting error for a mailbox I tried to migrate from Exchange 2013 to Exchange Online. The mailbox synced to 95% and I received the below error after I tried completing the batch.

Error details: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:ISourceFolder_EnumerateChanges2Result. The InnerException message was ‘Maximum number of items that can be serialized or deserialized in an object graph is ‘2000000’.

The key to this error is the object graph limit that is set in the MsExchangeMailboxReplication.exe config file. To resolve the issue do the following:

  1. Logon to your on premises Exchange CAS servers that you use as the proxies for migrating mailboxes to EOL. (In my case this was Exchange 2013)
  2. Open Notepad as an administrator
  3. Browse to C:\Program Files\Microsoft\Exchange Server\V15\Bin (or your Exchange installation path) and open the MsExchangeMailboxReplication.exe config file
  4. Hit ctrl + f in Notepad and search for maxItemsInObjectGraph (there are two entries and I had to change both values)
  5. You want to increase the number in these strings:   <dataContractSerializer maxItemsInObjectGraph=”20000000″/> This is what the original looks like below.
  6. Restart the mailbox replication service on all the servers where you have changed the value.
  7. If the migration failed, then delete the migration job and restart it. You should not have the error again.
  8. Change the strings back to default using the above steps after you migrated the affected mailboxes for which you received the above error.

Here’s what the entries in the config file look like before any changes were made:

 

<behavior name=”MrsProxyServiceBehavior”>
<serviceDebug includeExceptionDetailInFaults=”True” />
<serviceAuthorization serviceAuthorizationManagerType=”Microsoft.Exchange.MailboxReplicationService.MRSProxyAuthorizationManager, Microsoft.Exchange.MailboxReplicationService.ProxyService, Version=15.0.0.0, Culture=neutral, PublicKeyToken=%%%%%%%”/>
<serviceThrottling
maxConcurrentCalls=”200″
maxConcurrentSessions=”200″
maxConcurrentInstances=”200″ />
 <dataContractSerializer maxItemsInObjectGraph=”20000000″/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name=”MrsProxyEndpointBehavior”>
 <dataContractSerializer maxItemsInObjectGraph=”2000000″/>


Nov 14 2016

Error: MigrationRecipientNotFoundException: A recipient was not found for “mailboxName”

If you received the error “Error: MigrationRecipientNotFoundException: A recipient was not found for “mailboxName”” when migrating a mailbox to Exchange Online (Office 365) then check for the below AD attributes.

The error from the Exchange Admin Portal on Office 365:

0365migrationrecipientnotfound

Open the on premises Exchange Management Console and search for the user. You should see the mailbox shows it’s a Linked Mailbox instead of a Remote Mailbox as expected:

linkedmailbox

To rectify this, open AD Attribute Editor and browse to the msExchRecipientTypeDetails attribute. You should see the below:

msexchrecipienttypeforlinkedmailboxes

Change the Value of 2 to 1 for msExchRecipientTypeDetails as you need the mailbox to show as a user mailbox on premises before trying to migrate it to Exchange Online.

1

Wait for replication, remove the move request in Exchange Online via Shell and then migrate the mailbox to Exchange Online