Microsoft small business knowledge base

Article ID: 971353 - Last Review: January 15, 2015 - Revision: 3.0

This article has been archived. It is offered "as is" and will no longer be updated.


You want to create multiple Microsoft Dynamics CRM users at the same time. Therefore, you create multiple worker threads, and each worker thread uses the service.Create(user) method, as shown in the following example.
systemuser user = new systemuser();
However, if you run these threads on a computer that has multiple CPUs, you may receive the following error message:
Cannot insert duplicate key.
If you enable the Platform tracing function, you receive an error message that resembles the following:
CrmService.Create failed with an error "Restraint 'AKI_UserSettinsBase_TrackingTokenId' Unique KEY violation. Cannot import duplicate key.


This problem is fixed in the latest cumulative update rollup for Microsoft Dynamics CRM 4.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
949256  ( ) Microsoft Dynamics CRM 4.0 updates and hotfixes
kbnosurvey kbarchive kbfix kbexpertiseinter kbsurveynew kbmbsmigrate kbqfe KB971353
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support