SOAPWebServicesErrorDomain error -997 in Contacts.app on OS X with Office 365 account

Originator:xfox
Number:rdar://30733957 Date Originated:27-Feb-2017 04:56 PM
Status:Duplicate/25126970 Resolved:No
Product:Other Product Version:Contact.app 9.0 (1679.10) (El Capitan)
Classification:Other bug Reproducible:Yes
 
Summary:
Contacts.app on OS X gives error

"The operation couldn’t be completed.
(SOAPWebServicesErrorDomain error -997.)"

when syncing with an Office 365 account (please see attached file "O365 error.png").

It seems that this error prevents Contacts.app to successfully modify contacts created by an iOS device. That is, when modifying an Office 365 contact added to the Office 365 account by an iPhone with iOS 10.2.1, Contacts.app gives no error but the change doesn't get through the iOS device. Addition and deletion of contacts seems to work, both for contacts created on the Mac and on the iOS devices.

Attached "Contacts.app.log" file contains the log lines we see in Console.app when we launch Contacts.app and get the SOAPWebServicesErrorDomain error.

Steps to Reproduce:
1. To configure the Office 365 account on the Mac open System Preferences.app --> Internet Accounts.
2. Start the wizard to add an Exchange account.
3. Type the name you like in the "Name" field.
4. Type "XXXX@YYYY.org" in the "Email Address" field (this is the test account you can use to reproduce this issue).
5. Type "ZZZZZZ" in the "Password" field and click the "Sign In" button.
7. In the dialog to select the apps to use the account with, deselect everything except "Contacts" and click "Done".
8. Launch Contacts.app.
9. Notice the new Exchange account in window's sidebar.

Expected Results:
No warning icon should appear next to the Exchange account name.

Actual Results:
A warning icon appears next to the Exchange account name and clicking on it displays the message:
"The operation couldn’t be completed.
(SOAPWebServicesErrorDomain error -997.)"

Version:
OS X El Capitan 10.11.6 (15G1217)
Contacts.app 9.0 (1679.10)

Notes:
Office 365 Support send us this procedure to fix the issue:
1. go to a windows pc which has outlook 2016 installed. configure your exchange account there and disable exchange cache mode. 
2. download mfcmapi.exe (https://mfcmapi.codeplex.com/)
3. start this program and click on session - logon to connect to your mailbox with this program. 
4. double click on you mailbox name in the main window of mcfmapi.exe
5. a new windows opens, in this window open the root container by clicking once on the navigation triangle near the root container.
6. double click on allpersonmetadata
7. in the new opening window delete all entries
8. after that close mfcmapi.exe and start contacts app on mac

However, we found that it temporarily clears the error but as soon as a macOS or iOS device add or modify a contact, the issue reappears and we need to empty the allpersonmetadata container again.
Office 365 Support asked us to open a case with Apple to check if there is any pending issue.

Configuration:


Attachments:
'O365 error.png' and 'Contacts.app.log' were successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!