How to Configure the Autodiscover Service for Cross Forest Moves

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.


Applies to: Exchange Server 2007, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

This topic explains how to use the Exchange Management Shell to configure your Microsoft Exchange deployment to handle mailboxes that are moved from one forest to another for the Autodiscover service.

For a cross-forest mailbox move, the two forests must be trusted. For the Autodiscover service to handle this move, you must configure a mail contact in the original forest where the user's mailbox resided.

When you configure a mail contact, the user will authenticate to the original forest where the mailbox resided, and the user will receive a redirect that uses the new e-mail address. The client will then try to contact the Autodiscover service by using the new e-mail address against the new forest.

For example, and are separate, trusted forests and the mailbox for a user is This user originally resided in the forest named and was moved to the forest named

For this example, you have to set a contact in by using the following command in the Exchange Management Shell:

New-MailContact -ExternalEmailAddress '' -Name 'Kweku Ako Adjei' -Alias 'kwekua' -OrganizationalUnit '' -FirstName 'Kweku' -Initials '' -LastName 'Ako Adjei'

After you configure the contact, when the user connects to and uses the credentials, the following request is sent to the Outlook 2007 client:

<?xml version="1.0" encoding="utf-8" ?>\r\n

<Autodiscover xmlns="">\r\n






The Outlook 2007 client will receive the following redirect response from

<?xml version="1.0" encoding="utf-8"?>\r\n

<Autodiscover xmlns=""><Response xmlns="">\r\n






The user will then be able to connect to the Autodiscover service by using this new e-mail address in the forest.

Before You Begin

To perform the following procedures, the account you use must be delegated the following:

  • Exchange Server Administrator role and local Administrators group for the target server

For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations.


To use the Exchange Management Shell to create a new mail contact for the Autodiscover service to handle cross-forest mailbox moves

  • Run the following command:

    New-MailContact -ExternalEmailAddress '' -Name 'Kweku Ako Adjei' -Alias 'kwekua' -OrganizationalUnit '' -FirstName 'Kweku' -Initials '' -LastName 'Ako Adjei'

For more information about syntax and parameters, see New-MailContact.