IOS Mail - Active Sync - Sending Email Issue due to Policy Key change to 0 "X-MS-PolicyKey: 0 "

I'm working with our Vendor HCL on a problem that is randomly occurs when Forwarding/Sending emails on multiple devices for one User.

The error on the iPhone states: "Cannot Send Mail An error occurred while delivering this message." But the message is delivered to the intended recipients.

HCL states the Apple iPhone, with IOS 16.2, randomly changes the X-MS-PolicyKey to 0 which forces the end user to get an error sporadically when sending Emails.

This issue occurs for the end user on average 1 of 20 emails he forwards from his iPhone 13 Max Pro or iPhone 14 Max Pro. We have done all the basic Trouble Shooting with Apple Technical Support Tier 2.

Which includes:

  1. removing and re-adding the email
  2. Trying a new device
  3. upgrading the latest IOS 16.2
  4. Resetting the Network Settings
  5. Trying on different Wifi networks
  6. Restore the device
  7. Change the Days to sync email

HCL Support Technical Recap of the issue: To be technically accurate, we are talking about the following policy key that flows in the http request header

X-MS-PolicyKey: 0

The 0 is unexpected and will force Traveler to return a 449 so that the client and server will negotiate a new policy key. Typically its going to have a value like the following:

X-MS-PolicyKey: 369126834

That value comes from Traveler in response to an Exchange ActiveSync "Provision" command. Example response payload: 1 MS-EAS-Provisioning-WBXML 1 369126834

So something is happening with the iOS Mail app such that it is losing the current policy key. Its not possible to see what is triggering this from the traveler server. Its possible that the client is seeing some error (network?) for which it then gives up and starts with a policy key 0. That is pure speculation and something Apple support will need to comment on. When communicating with apple, use the header term X-MS-PolicyKey. Hopefully they recognize what we are talking about. "

HCL Support Technical Recap Explanation 2:

"We've engaged our extended team to further check and investigate the issue

As per checking on the logs, the device keeps sending a policy key 0 instead of the previously negotiated. Not only during a SendMail, but for pushAS D->S (a Push from the Device to the Server) so a new key needs to be sent and redo the requests.

[12/20 18:10:34.126] FINEST WD-7f71ed3a3700 USER NAME[835J2Q3PCT09T4NVV8D63R7VEO] WorkManager$WorkerRunnable.run#4272 Device sent a policy key of 0 which is zero or does not match the server stored policy key of 817277860, so a 449 HTTP return code would be sent except that the device has the known bug of not sending the policy key on the Settings request when done close to a Provision request. Therefore, we will allow this request and NOT return the 449.

So, while the device has sent the 449 for this request, Traveler ignores it due the the known bug.

A policy key 0 is sent for the sync request (1220-1810-32807_Sync_4_1862_in.xml) "Device sent a policy key of 0 which is zero or does not match the server stored policy key of 817277860, so a 449 HTTP return code should be sent." so the Sync out shows the 449 and a Provision is needed to reestablish the a policy key. After that the Sync is successful.

The device is sending a policy key of 0 and we cannot tell why. "

I'm looking for any help to figure out why multiple devices change the X-MS-PolicyKey:  to 0. HCL pushes this to an Apple IOS issue. I do not know how to provide them right or wrong on this. Any assistance is much apricated. Thank you

I have customer who is having this same issue on Iphone 13. was running latest IOS when first discovered on 16.3 now.

Thanks

IOS Mail - Active Sync - Sending Email Issue due to Policy Key change to 0 "X-MS-PolicyKey: 0 "
 
 
Q