Wednesday, 13 March 2013

systemuser with Id = guid Does Not Exist

I have created a crm org in one server, then imported that org from that server to dev server and then imported few solutions on top it.

things were fine however in order to diagnose one of the bug client was facing I deployed solution to debug as I used to do in my old dev machine/domain.

When solution was deployed some of the plugins were working fine however on couple of plugins I was getting following error

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: systemuser With Id = 56702f79-c33a-e111-8820-00155d450361 Does Not ExistDetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220969</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>systemuser With Id &amp;#61; 000000000-0000-0000-0000-000000000000 Does Not Exist</Message>
  <Timestamp>2013-03-13T10:05:18.7976683Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText>
[Plugins:Plugins.PluginName]
[000000000-0000-0000-0000-000000000000: PluginName]
Entered Plugins.PluginName.Execute(), Correlation Id: 000000000-0000-0000-0000-000000000000, Initiating User: 000000000-0000-0000-0000-000000000000 Plugins.PluginName is firing for Entity: prefix_entityname, Message: Update, Correlation Id: 000000000-0000-0000-0000-000000000000, Initiating User: 000000000-0000-0000-0000-000000000000 Exception: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: systemuser With Id = 000000000-0000-0000-0000-000000000000 Does Not Exist (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault)., Correlation Id: 000000000-0000-0000-0000-000000000000, Initiating User: 000000000-0000-0000-0000-000000000000
Exiting Plugins.PluginName.Execute(), Correlation Id: 000000000-0000-0000-0000-000000000000, Initiating User: 000000000-0000-0000-0000-000000000000
</TraceText>
</OrganizationServiceFault>

when trying to find something from plugin registeration tool, nothing was strange, plugins are running under calling user.

REASON/Resolution: This was happing due to I am using crm development toolkit, and in RegisterFile.crmregister I am using ImpersinatingUser to run plugin under certain useraccount. and here it had old crm user GUID which was valid in different domain and crm org but for my current new crm orgs under new domain are invalid.

No comments:

Post a Comment