locked
The userid assocaited with the current record is not valid crm2013 workflow RRS feed

  • Question

  • hello everyone

    i am having a big issue executing my workflows on the crm 2013. once i try running the workflow with any user account, i get the error "The user associated with the current record is not valid". i have tried every thing still no results please help.

    find below the error trail i get:

    Unhandled Exception: Microsoft.Crm.CrmException: The user Id is invalid.
       at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetPrivilegedUserCallerAndBusinessGuidsFromThread(WindowsIdentity identity, IOrganizationContext context)
       at Microsoft.Crm.Authentication.CrmWindowsIdentity.DoRecognizeUser(String userToken, Guid organizationId, LocatorServiceContext locatorServiceContext)
       at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId, LocatorServiceContext locatorServiceContext)
       at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId)
       at Microsoft.Crm.Extensibility.InternalSdkContextInitializer.SetHttpContext(WindowsIdentity windowsIdentity, Guid organizationId, Guid callerId)
       at Microsoft.Crm.Extensibility.InprocessServiceProxy.RetrieveCore(String entityName, Guid id, ColumnSet columnSet)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Retrieve(String entityName, Guid id, ColumnSet columnSet)
       at Microsoft.Crm.Workflow.WorkflowLoader.LoadWorkflow(Guid workflowActivationId, IOrganizationContext context)
       at Microsoft.Crm.Caching.WorkflowActivationCacheLoader.LoadCacheData(Guid key, IOrganizationContext context)
       at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.CreateEntry(TKey key, IOrganizationContext context)
       at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)
       at Microsoft.Crm.Workflow.ActivityHostBase.StartWorkflow(ICommonWorkflowContext context)

    Monday, August 25, 2014 12:08 PM

All replies

  • Hi,

    can you please check if the owner of the entity which you run the workflow against is not disabled?

    you could also enable tracing to find the userid that was s causing trouble.

    regards,

    Jithesh

    Monday, August 25, 2014 10:56 PM
  • hi Jithesh

    Thank you for your mail. i have checked the user and it is enabled.how do i enable tracing.

    thanks

    Tuesday, August 26, 2014 7:54 AM
  • Hello all . i was able to enable tracing and this is what i found from the trace file.

    [2014-08-26 12:32:02.262] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   83 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: c730ec72-1504-43fa-a1fa-57c83e02f9f6 | CrmException..ctor  ilOffset = 0x0
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException)  ilOffset = 0x0
    at CrmException..ctor(String message, Int32 errorCode)  ilOffset = 0x0
    at ServerLocatorService.GetDefaultOrganization(String authenticationInfo)  ilOffset = 0x21
    at BaseCrmIdentity.RecognizeCrmUser(Guid organizationId, LocatorServiceContext locatorServiceContext)  ilOffset = 0x33
    at BaseCrmIdentity.RecognizeCrmUser(Guid organizationId)  ilOffset = 0x0
    at WindowsIdentityAuthorizationManager.Authenticate(OperationContext operationContext)  ilOffset = 0x157
    at WindowsIdentityAuthorizationManager.CheckAccessCore(OperationContext operationContext)  ilOffset = 0x22
    at AuthorizationBehavior.Authorize(MessageRpc& rpc)  ilOffset = 0x28
    at ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)  ilOffset = 0x293
    at MessageRpc.Process(Boolean isOperationContextSet)  ilOffset = 0x62
    at ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)  ilOffset = 0x1D7
    at ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)  ilOffset = 0xF1
    at ChannelHandler.AsyncMessagePump(IAsyncResult result)  ilOffset = 0x21
    at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)  ilOffset = 0x0
    at AsyncResult.Complete(Boolean completedSynchronously)  ilOffset = 0xC2
    at ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)  ilOffset = 0x55
    at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)  ilOffset = 0x0
    at AsyncResult.Complete(Boolean completedSynchronously)  ilOffset = 0xC2
    at AsyncQueueReader.Set(Item item)  ilOffset = 0x21
    at InputQueue`1.Dispatch()  ilOffset = 0x121
    at ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)  ilOffset = 0x22
    at IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)  ilOffset = 0x5
    at _IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)  ilOffset = 0x3C
    >Crm Exception: Message: User Was Not Found, ErrorCode: -2147220969
    [2014-08-26 12:32:02.372] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   83 |Category: Platform.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: c730ec72-1504-43fa-a1fa-57c83e02f9f6 | ServiceModelTraceRedirector.TraceData  ilOffset = 0x45
    at ServiceModelTraceRedirector.TraceData(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, Object data)  ilOffset = 0x45
    at TraceSource.TraceData(TraceEventType eventType, Int32 id, Object data)  ilOffset = 0x68
    at DiagnosticTrace.TraceEvent(TraceEventType type, Int32 code, String msdnTraceCode, String description, TraceRecord trace, Exception exception, Object source)  ilOffset = 0x6B
    at ExceptionUtility.TraceHandledException(Exception exception, TraceEventType eventType)  ilOffset = 0x5D
    at MessageRpc.ProcessError(Exception e)  ilOffset = 0x33
    at MessageRpc.Process(Boolean isOperationContextSet)  ilOffset = 0x62
    at ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)  ilOffset = 0x1D7
    at ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)  ilOffset = 0xF1
    at ChannelHandler.AsyncMessagePump(IAsyncResult result)  ilOffset = 0x21
    at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)  ilOffset = 0x0
    at AsyncResult.Complete(Boolean completedSynchronously)  ilOffset = 0xC2
    at ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)  ilOffset = 0x55
    at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)  ilOffset = 0x0
    at AsyncResult.Complete(Boolean completedSynchronously)  ilOffset = 0xC2
    at AsyncQueueReader.Set(Item item)  ilOffset = 0x21
    at InputQueue`1.Dispatch()  ilOffset = 0x121
    at ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)  ilOffset = 0x22
    at IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)  ilOffset = 0x5
    at _IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)  ilOffset = 0x3C
    ><TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error"><TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.TraceHandledException.aspx</TraceIdentifier><Description>Handling an exception.</Description><AppDomain>/LM/W3SVC/1/ROOT-1-130535062461715261</AppDomain><Exception><ExceptionType>Microsoft.Crm.CrmConfigObjectNotFoundException, Microsoft.Crm.Core, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</ExceptionType><Message>User Was Not Found</Message><StackTrace>   at Microsoft.Crm.ServerLocatorService.GetDefaultOrganization(String authenticationInfo)
    >   at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId, LocatorServiceContext locatorServiceContext)
    >   at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId)
    >   at Microsoft.Crm.Authentication.WindowsIdentityAuthorizationManager.Authenticate(OperationContext operationContext)
    >   at Microsoft.Crm.Authentication.WindowsIdentityAuthorizationManager.CheckAccessCore(OperationContext operationContext)
    >   at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc&amp;amp; rpc)
    >   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp;amp; rpc)
    >   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace><ExceptionString>Microsoft.Crm.CrmConfigObjectNotFoundException: User Was Not Found
    >   at Microsoft.Crm.ServerLocatorService.GetDefaultOrganization(String authenticationInfo)
    >   at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId, LocatorServiceContext locatorServiceContext)
    >   at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId)
    >   at Microsoft.Crm.Authentication.WindowsIdentityAuthorizationManager.Authenticate(OperationContext operationContext)
    >   at Microsoft.Crm.Authentication.WindowsIdentityAuthorizationManager.CheckAccessCore(OperationContext operationContext)
    >   at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc&amp;amp; rpc)
    >   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp;amp; rpc)
    >   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</ExceptionString></Exception></TraceRecord>

    it seems that the user does not exist. but i can log in as the user and perform crm operations like creating a record etc. how can the user not exist

    Tuesday, August 26, 2014 11:49 AM