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.
Infrastructure:
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
Toronto
1 DC for Exchange 2013 FSW
Autodiscover URL for 2013 – Autodiscover.domain.com
Autodiscover URL for 2013 – mail.domain.com
We ran autodiscover test on EXRCA.com which gave us the success. ActiveSync should work on your mobile devices.
Issue:
Autodiscover is not configuring Exchange 2013 or Exchange 2007 profile on mobile devices.
Another statement can be activesync is successfully passing the tests on EXRCA.com or https://testconnectivity.microsoft.com/ but failed to configure mobile devices.
Troubleshooting:
-
Configured domain like below in the Exchange 2013 CAS internet facing AD site servers but it didn’t help
- On each CAS server, launch Internet Information Services (IIS) Manager
- Expand Sites | Default Web Site
- Click on Microsoft‐Server‐ActiveSync | Authentication | Basic Authentication
- From the Action menu, click on Edit
- Enter \ on the Default Domain and ADDomainname on the Realm field
- Click OK to save settings
- Run IISRESET from an elevated command prompt
- On each CAS server, launch Internet Information Services (IIS) Manager
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
- Configure per user by going to their properties
- Use a bulk AD modification tool.
-
Script it in powershell
$users = Get-QADuser -size 0
foreach($user in $users)
{
$UPN = “$($user.sAMAccountName)@emaildomainname.com”
$user | Set-QADUser -UserPrincipalName $UPN
}
-
EMS commands
- $users = Get-Mailbox
-
$users | ForEach {Set-User -Identity $_.Identity -UserPrincipalName $_.WindowsEmailAddress}
- $users = Get-Mailbox
Important: Any bulk modification should be tested in the lab.
Conclusion:
UserPrincipalName plays big role in the success of autodiscover and other configurations. We should configure UPN correctly for our messaging infrastructure.
Microsoft MVP | Exchange Server
Team@MSExchangeGuru
May 18th, 2016 at 2:16 pm
Thanks this was exactly my problem and solution. Very good solution.