Sunday, February 1, 2015

iPhone not syncing after Exchange 2013 migration

My customer was doing a migration from Microsoft Exchange Server 2010 to 2013.
The first step was to setup the coexistence between the old and the new environment.

When the coexistence went live, some users reported they were constantly being prompted for their password on their iPhones.

Root cause
the Active Sync device (in this case iPhone) is not specifying the Active Directory domain.


  • Recreate the Exchange account on the iPhone solved the problem, setting the domain
  • Set the "domain" field to the name of your Active Directory domain on the iPhone

see the Apple support page for screenshots

Specify a default domain on the IIS servers of the Exchange CAS

Validate solution
Finally, we wanted to check if EAS devices were successfully syncing (=that the problem was gone).

The below (long) command will give you the difference between the last attempt to sync mail and the last succesful attempt.You should pipe this to Export-csv in order to import it into Excel for analysis, sort by the "SyncdiffHours" field to get an idea if any issues are remaining.

Get-Mailbox -Filter * -ResultSize Unlimited | %{Get-MobileDeviceStatistics -Mailbox $_}
| select Identity,DeviceModel,LastSyncAttemptTime,LastSuccessSync,@{n="SyncdiffHours";e={(New-TimeSpan -start $_.LastSy
ncAttemptTime -End $_.LastSuccessSync).Hours}}