Learn Exchange the Guru way !!!


Exchange: UPN’s Role in ActiveSync Autodiscover

Today I have fixed another small issue which I would like to share with you to update this critical details which you might not be caring.

Many of deal with split dns name space in the exchange and AD. It is important to understand that you email domain should match to your userprincipalname to let autodiscover work as expected.



3 AD Sites: Los Angeles, New York and Toronto. They have more but for this infrastructure we are just using 3.

Los Angeles:

2 DCs

4 Exchange 2013 – CAS+MBX – DAG

1 Exchange 2007 – CAS+MBX+HT


New York

2 DCs

4 Exchange 2013 – CAS+MBX – DAG

1 Exchange 2007 – CAS+MBX+HT



1 DC for Exchange 2013 FSW



Autodiscover URL for 2013 –

Autodiscover URL for 2013 –


We ran autodiscover test on which gave us the success. ActiveSync should work on your mobile devices.



Autodiscover is not configuring Exchange 2013 or Exchange 2007 profile on mobile devices.

Another statement can be activesync is successfully passing the tests on or but failed to configure mobile devices.



  1. Configured domain like below in the Exchange 2013 CAS internet facing AD site servers but it didn’t help
    1. On each CAS server, launch Internet Information Services (IIS) Manager
    2. Expand Sites | Default Web Site
    3. Click on MicrosoftServerActiveSync | Authentication | Basic Authentication
    4. From the Action menu, click on Edit
    5. Enter \ on the Default Domain and ADDomainname on the Realm field
    6. Click OK to save settings
    7. Run IISRESET from an elevated command prompt


2. Added alternate UPN under active directory domains and trusts as shown below.


-Then updated user upn by going to their property from active directory users and computers.

-Now we were able to configure ActiveSync every single time for both 2013 and 2007 users.


You will be concerned how to update all users. There are multiple options

  1. Configure per user by going to their properties
  2. Use a bulk AD modification tool.
  3. Script it in powershell

    $users = Get-QADuser -size 0

    foreach($user in $users)


    $UPN = “$($user.sAMAccountName)”

    $user | Set-QADUser -UserPrincipalName $UPN


  4. EMS commands
    1. $users = Get-Mailbox
    2. $users | ForEach {Set-User -Identity $_.Identity -UserPrincipalName $_.WindowsEmailAddress}


Important: Any bulk modification should be tested in the lab.



UserPrincipalName plays big role in the success of autodiscover and other configurations. We should configure UPN correctly for our messaging infrastructure.


Prabhat Nigam

Microsoft MVP | Exchange Server


One Response to “Exchange: UPN’s Role in ActiveSync Autodiscover”

  1. Toby Says:

    Thanks this was exactly my problem and solution. Very good solution.

Leave a Reply




Do NOT follow this link or you will be banned from the site!