Recently while trying to retrieve OptionSet Metadata using our favorite KingswaySoft SSIS Toolkit we got the below error.
Same error for prod also – [CDS Source [2]] Error: An error occurred with the following error message: “KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmServiceException: CRM service call returned an error: An error has occurred when retrieving metadata for CRM entity ‘copilotexamplequestion’: The source argument contains duplicate keys. (SSIS Integration Toolkit for Microsoft Dynamics 365, v23.2.2.32701 – DtsDebugHost, v16.0.5270.0)System.ArgumentException. : The source argument contains duplicate keys.”.
More on Metadata Source in CDS Source Component – https://www.kingswaysoft.com/blog/2022/10/18/Introducing-the-Metadata-Source-Type-in-CRMCDS-Source-Component

Interestingly we were getting this issue while running the package in the UAT and Production environment, it was working fine for the Dev environment. Also, it was OOB Table and we could compare and see it to be the same across all the environments.
Well, the way we could progress here is to query and get the required details from the stringmap table.
e.g.

Hope it helps..






















