"An item with the same key has already been added." When syncing Calendar from Exchange Online

I’ve done some searching, and it looks like this problem goes back 5 years, but there’s never been a solution given that I can find. I’ve trimmed my calendars down to the bare minimum to try and get this to work…

Logs from internal sync client:

 4:14:36 PM [email protected] [Exchange Web Services] Synchronizing folder '[email protected]/Calendar/' 4:14:38 PM [email protected] [Exchange Web Services] MailClient.Accounts.ConnectionException: An item with the same key has already been added. ---\> System.ArgumentException: An item with the same key has already been added. 4:14:38 PM at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) 4:14:38 PM at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.TimeZoneDefinition.TryReadElementFromXml(EwsServiceXmlReader reader) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.ComplexProperty.InternalLoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName, Func`2 readAction) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.TimeZonePropertyDefinition.LoadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.PropertyBag.LoadFromXml(EwsServiceXmlReader reader, Boolean clear, PropertySet requestedPropertySet, Boolean onlySummaryPropertiesRequested) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.EwsServiceXmlReader.ReadServiceObjectsCollectionFromXml[TServiceObject](XmlNamespace collectionXmlNamespace, String collectionXmlElementName, GetObjectInstanceDelegate`1 getObjectInstanceDelegate, Boolean clearPropertyBag, PropertySet requestedPropertySet, Boolean summaryPropertiesOnly) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.GetItemResponse.ReadElementsFromXml(EwsServiceXmlReader reader) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.ServiceResponse.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.ParseResponse(EwsServiceXmlReader reader) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadResponse(EwsServiceXmlReader ewsXmlReader) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponseXml(Stream responseStream) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(IEwsHttpWebResponse response) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute() 4:14:38 PM at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalLoadPropertiesForItems(IEnumerable`1 items, PropertySet propertySet, ServiceErrorHandling errorHandling) 4:14:38 PM at Microsoft.Exchange.WebServices.Data.ExchangeService.LoadPropertiesForItems(IEnumerable`1 items, PropertySet propertySet) 4:14:38 PM at MailClient.Protocols.Exchange.ExchangeItemSynchronizer`2.d\_\_18.MoveNext() 4:14:38 PM at System.Linq.Enumerable.d\_\_20`3.MoveNext() 4:14:38 PM at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) 4:14:38 PM at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) 4:14:38 PM at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) 4:14:38 PM at MailClient.Protocols.Common.ScheduleItemSynchronizeContext`1.StoreItems(SynchronizationType type, IEnumerable`1 newItems) 4:14:38 PM at MailClient.Protocols.Common.ItemSynchronizeContext`2.Synchronize[T](SynchronizationType synchronizationType, IEnumerable`1 items, Func`2 getUniqueId, Func`3 hasChanged, Func`2 isDeleted, Func`2 convertItems, Action`2 updateItem) 4:14:38 PM at MailClient.Protocols.Exchange.ExchangeItemSynchronizer`2.Synchronize(IItemSynchronizeContext`1 synchronizeContext, Folder folder, CancellationToken cancellationToken) 4:14:38 PM at MailClient.Protocols.Common.ItemSynchronizer`2.\<\>c\_\_DisplayClass32\_0.b\_\_1(WorkerStatus status, CancellationToken cancellationToken) 4:14:38 PM at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status) 4:14:38 PM --- End of inner exception stack trace --- 4:14:38 PM at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status) 4:14:38 PM at MailClient.Commands.Command.Process(WorkerStatus status) 4:14:39 PM [email protected] [Exchange Web Services] Synchronizing folder '[email protected]/Calendar/'

I’ve also emailed the EWS log to [email protected] with the subject “ISSUE: An item with the same key has already been added”

This is an app killer for us, but I’m more than ready to buy if calendar can get working. I saw an agent in another thread say this is an issue with Exchange’s protocols, but I know this can be programmed around somehow, because several other clients as well as my phone apps work just fine.


For anyone else struggling with finding a client that integrates Google and Exchange mailboxes: I’ve tried quite a few, and eM Client is by far the closest to a complete solution, but this bug cripples it for me. After weeks of fiddling with different options in my off time, I finally had to move back to the overly-bloated Outlook client. If you’re in the same streak of unfortunate luck, you can do the following to get Google in there for the most part.

Sync Google Calendar’s (this is tedious, as it’s done per calendar):

Setup Gmail to play with external apps that (for some reason) don’t use the web based OAUTH:

You can now add GMail to Outlook using the app key you generated as your account password when you run the add account wizard.

Optionally, you can import your contacts as well, but it’s important to note that these won’t sync:

And of course we don’t have a unified inbox now, so the best solution/work-around for that is to hit the search bar in Outlook, select All Folders in the ribbon bar to open the scope to everything.

Now enter this to compile the inboxes:folder:Inbox
For a unified Sent box:
folder: (Sent Mail)

You can append whatever search terms you need to after that.