"Couldn't find database" error when you run cmdlets for a mailbox hosted in a different Exchange Online region

Symptoms

Assume that you are an account administrator. When you try to run the New-MailboxSearch, Search-MailboxAuditLog, New-MailboxImportRequest, or New-MailboxRestoreRequest cmdlet for a mailbox that's hosted in a different region from your account region, you receive one of the following error messages:

Couldn't find database "<database>". Make sure you have typed it correctly.

Can't connect to the mailbox of user Mailbox database guid <GUID> because the ExchangePrincipal object contains outdated information. The mailbox may have been moved recently.

However, in this scenario, you can do the following actions:

  • You can successfully run these cmdlets for a mailbox that's hosted in the same region as your account region.
  • You can successfully run other cmdlets, such as Set-CalendarProcessing or Get-Mailbox, for mailboxes that are hosted in a different region.

Cause

These cmdlets fail for mailboxes that are in a different region from the region in which the administrator account is located. An administrator account may have a mailbox in a particular region, or the account may be a mail-enabled user account that may connect to the arbitration mailboxes in the default region.

Workaround

To work around this issue, you can force a connection to another region by changing the value of the ConnectionUri parameter when you use the New-PSSession cmdlet. For example, you can run the following cmdlet:

New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid?email=alias@contoso.com-Credential $UserCredential -Authentication Basic -AllowRedirection

The appended email address in the ConnectionUri parameter should be for a mailbox that's in the region for which you want to run the New-MailboxSearch, Search-MailboxAuditLog, New-MailboxImportRequest, or New-MailboxRestoreRequest cmdlet.

For example, if your mailbox is in the European Union region, and you want to run the cmdlet against a mailbox in the United States region, you have to locate a mailbox in the United States region (it can be any mailbox in that region), and then append the email address of that mailbox to the ConnectionUri parameter. To be able to do this, you don't have to have special permissions to the United States mailbox. Appending the email address forces the connection to be made in the United States region. This enables the cmdlets to be run successfully for a United States mailbox.