Error when you perform a multi-mailbox search in Exchange Server 2010: The user does not have an exchange mailbox

Original KB number:  2702446

Symptoms

Consider the following scenario:

  • You start the Exchange Control Panel (ECP) in Microsoft Exchange Server 2010 Enterprise or in Exchange Server 2010 Standard.
  • You do a multi-mailbox search.
  • The multi-mailbox search uses a System mailbox, the Discovery Search mailbox, or the Federated mailbox as the target for the search.

In this scenario, you may get the following error message:

The user does not have an exchange mailbox

Additionally, the following event is logged in the Application log:

Log Name: Application
Source: MSExchange Configuration Cmdlet - Remote Management
Event ID: 5
Task Category: General
Level: Error
Keywords: Classic
Description:
(PID 6268, Thread 53) Task New-MailboxSearch throwing terminating exception at stage Microsoft.Exchange.Data.Storage.UserHasNoMailboxException: The user does not have an Exchange mailbox.
at Microsoft.Exchange.Data.Storage.ExchangePrincipal.InternalFromADUser(ADUser user, ADObjectId mdb, DatabaseLocationInfo databaseLocationInfo, Boolean ignoreSiteBoundary)
at Microsoft.Exchange.Data.Storage.Infoworker.MailboxSearch.MailboxDataStore.OpenMailboxSession(ADUser adUser)
at Microsoft.Exchange.Data.Storage.Infoworker.MailboxSearch.MailboxDataStore..ctor(ADUser adUser)
at Microsoft.Exchange.Data.Storage.Infoworker.MailboxSearch.MailboxDataProvider.OpenMailboxStore()
at Microsoft.Exchange.Data.Storage.Infoworker.MailboxSearch.MailboxDataProvider.Exists[T](String name)
at Microsoft.Exchange.Management.Tasks.NewMailboxSearch.PreSaveValidate(SearchObject savedObject)
at Microsoft.Exchange.Management.Tasks.NewMailboxSearch.InternalEndProcessing(). Exception: {4c1ab22a-bd1d-41e9-b178-5e75ffd14563}

Cause

This issue can occur if one or more of the following mailboxes are in an inconsistent state because no value is set for the HomeMDB attribute:

  • One or more System mailboxes
  • The Federated mailbox
  • The Discovery Search mailbox

Resolution

To resolve this issue, follow these steps:

  1. Start the ECP.

  2. Verify that one or more mailboxes are in an inconsistent state. To do this, type the following cmdlet, and then press Enter:

    Get-Mailbox -Arbitration |fl name, alias
    

    Note

    You may receive an error message that resembles the following. This error message confirms that one or more System mailboxes or the Federated mailbox is in an inconsistent state:

    WARNING: The object SystemMailbox{1f05a927-9daf-4003-9bf7-036822f96290} has been corrupted, and it's
    in an inconsistent state. The following validation errors happened:
    WARNING: Database is mandatory on UserMailbox.
    WARNING: Database is mandatory on UserMailbox.

  3. Verify that the value for the HomeMDB attribute is missing for a mailbox. To do this, type the following cmdlet in the ECP, and then press Enter:

        Get-Mailbox |fl name, alias
    

    Note

    The following error message indicates that the value for the HomeMDB attribute is missing:
    Database is mandatory on UserMailbox

  4. Copy the HomeMDB attribute value for a mailbox in the same database as the System mailbox, the Federated mailbox, or the Discovery Search mailbox. To do this, follow these steps:

    1. Click Start, type Adsi Edit in the Search programs and files box, and then press Enter.

    2. On the Action menu, click Connect to.

    3. Click Select or type a domain or server, select the server that you want, and then click OK.

    4. Expand Default naming context, and then click the following item:

      DC=domain,DC=com

    5. Double-click CN=Users.

    6. Right-click a user mailbox, and then click Properties.

    7. Under Attribute, click homeMDB > Edit.

    8. Copy the value for the HomeMDB attribute, and then click OK two times.

  5. Set the HomeMDB attribute value on the System mailbox, the Federated mailbox, or the Discovery Search mailbox account. To do this, follow these steps:

    1. In ADSI Edit, right-click the account for the System mailbox, the Federated mailbox, or the Discovery Search mailbox, and then click Properties.
    2. Under Attribute, click homeMDB > Edit.
    3. Type or paste the HomeMDB attribute value that you copied in step 4.
    4. Click OK two times.
  6. On the File menu, click Exit.

  7. Replicate the forest. To do this, type the following cmdlet at an elevated command prompt, and then press Enter:

    repadmin /syncall /e
    

More information

For more information about the HomeMDB attribute, see HomeMDB Property.

For more information about an issue that can occur when the value for the HomeMDB attribute is missing on the System Attendant mailbox, see The System Attendant homeMDB attribute is missing.