OSX iCloud Contacts not syncing

In the last month I was plagued by a Addressbook problem on one of my macs. No matter what, only about 500 of my over 1000 contacts where syncing on my Mac Pro. I have tired many times to disable and re-enable the contacts, to export all the contacts on the only mac where my contacts were complete, empty the address book and reimporting the contacts, but with limited success. Some corrupt contact was blocking my Mac Pro form syncing.

The console messages where not really helpful ranging from a generic

[snippet id=”18″]

to a more usefull

[snippet id=”17″]

X-MS-OL-DESIGN was a starting clue so I exported again all contacts in vcf and opened the file in a text editor to find which ones had the X-MS-OL-DESIGN property. The idea was to edit them, and remove the offending property. But first I wanted to check if this was really the cause of my problems. So every time I found a contact with the X-MS-OL-DESIGN property I copied it into a secondary iCloud account that I created years ago and deleted it from my primary account. After removing all entries with the X-MS-OL-DESIGN property, I was able to sync all remaining contacts on the Mac Pro. Moreover, by moving the offending contacts to the secondary account, the offending property was gone, and I was able to move them back in the primary account and they where synced perfectly.