Workflow failing: "You do not have the necessary permissions to change the domain login for this user"

Answered Workflow failing: "You do not have the necessary permissions to change the domain login for this user"

  • 2012년 4월 13일 금요일 오후 2:53
     
     

    So I have a workflow that does nothing but change the status of a record, and it's failing with the above error.  I have tried everything in this thread: http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/126dcf92-b6f5-4e68-9a1f-524e6be5c69a to no avail.

    Making a new workflow fails, changing the owner and who runs the workflow also fails.   Any suggestions on how to solve this would be great.

    This is the detailed error I'm getting:

    Workflow paused due to error: Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Access is denied.Detail:

    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">

      <ErrorCode>-2147187707</ErrorCode>

      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />

      <Message>Access is denied.</Message>

      <Timestamp>2012-04-13T13:31:52.171776Z</Timestamp>

      <InnerFault>

        <ErrorCode>-2147187707</ErrorCode>

        <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />

        <Message>Access is denied.</Message>

        <Timestamp>2012-04-13T13:31:52.171776Z</Timestamp>

        <InnerFault>

          <ErrorCode>-2147220970</ErrorCode>

          <ErrorDetails xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />

          <Message>System.UnauthorizedAccessException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #16AA9B76</Message>

          <Timestamp>2012-04-13T13:31:52.171776Z</Timestamp>

          <InnerFault i:nil="true" />

          <TraceText i:nil="true" />

        </InnerFault>

        <TraceText i:nil="true" />

      </InnerFault>

      <TraceText i:nil="true" />

    </OrganizationServiceFault>

       at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)

       at Microsoft.Crm.Extensibility.InprocessServiceProxy.ExecuteCore(OrganizationRequest request)

       at Microsoft.Crm.Workflow.Services.SetStateActivityService.<>c__DisplayClass1.<SetStateInternal>b__0(IOrganizationService sdkService)

       at Microsoft.Crm.Workflow.Services.ActivityServiceBase.ExecuteInTransactedContext(ActivityDelegate activityDelegate)

       at Microsoft.Crm.Workflow.Services.SetStateActivityService.SetStateInternal(String entityName, Guid entityId, Int32 state, Int32 status)

       at Microsoft.Crm.Workflow.Services.SetStateActivityService.ExecuteInternal(ActivityContext executionContext, SetState setState)

       at Microsoft.Crm.Workflow.Services.SetStateActivityService.Execute(ActivityContext executionContext, SetState setState)

       at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)

       at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)


    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

모든 응답

  • 2012년 4월 13일 금요일 오후 4:57
    답변자
     
     

    Hello,

    You should try switch on trace, restart IIS and AsyncService, reproduce error and recheck logs that had been generated.

  • 2012년 4월 13일 금요일 오후 6:23
     
     

    Here is the async log related to the above error:

    [2012-04-13 13:12:10.903] Process:CrmAsyncService |Organization:8c7b881d-5950-4e4e-a03d-6f5026d05a94 |Thread:   15 |Category: Platform.Workflow |User: 00000000-0000-0000-0000-000000000000 |Level: Error | UnhandledExceptionEventHandler.OnStage1Complete
    >Workflow terminated: {8852D83E-6820-4A1F-B73D-7A7922E63889} - System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Access is denied. (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault)., AsyncOperationId: {E80DD02A-9485-E111-ADEA-005056B43876}
    [2012-04-13 13:12:10.903] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread:   15 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error | WorkflowToAsyncResultConverter.Convert
     at WorkflowToAsyncResultConverter.Convert(WorkflowSystemPausedResult wfResult)
     at WorkflowToAsyncResultConverter.Convert()
     at WorkflowContext.EndProcessing(IGenericHandlerResult result)
     at ActivityHost.CompleteWorkflow(IGenericHandlerResult result, WorkflowApplication activityInstance, ICommonWorkflowContext context)
     at ActivityHostBase.OnWorkflowTerminated(WorkflowApplicationUnhandledExceptionEventArgs args, WorkflowApplication activityInstance, ICommonWorkflowContext context)
     at UnhandledExceptionEventHandler.OnStage1Complete(IAsyncResult lastResult, WorkflowApplication instance, Exception exception, Activity source, String sourceInstanceId)
     at UnhandledExceptionEventHandler.Run(WorkflowApplication instance, Exception exception, Activity exceptionSource, String exceptionSourceInstanceId)
     at WorkflowApplication.OnNotifyUnhandledException(Exception exception, Activity exceptionSource, String exceptionSourceInstanceId)
     at ActivityExecutor.NotifyUnhandledException(Exception exception, ActivityInstance source)
     at Scheduler.OnScheduledWork(Object state)
     at SendOrPostThunk.UnhandledExceptionFrame(Object state)
     at CallbackHelper.InvokeWithoutContext(Object state)
     at ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
     at IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
     at _IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
    >Crm Exception: Message: , ErrorCode: -2147220970


    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.


    Never mind, that isn't the whole log.  The line above it pointed to a plugin that access is being denied on.  Checking now, but I'm betting that's the culprit.
    • 편집됨 Wayne Walton 2012년 4월 13일 금요일 오후 6:26 posted incomplete log.
    •  
  • 2012년 4월 13일 금요일 오후 6:56
     
     

    Hi Wayne, Since plugins run by default in the context of the calling user, I guess I'll ask if that user has the appropriate edit privilege access level on the entity in question. If you're not sure what privilege the user is missing, you can enable tracing as Maryna suggested, and when you capture the trace - search for ChkPrivilege and you'll do something like:

    http://support.microsoft.com/kb/953962

    but it sounds like calling user privileges to me.


    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful. Michael Mayo

  • 2012년 4월 13일 금요일 오후 6:58
     
     

    I would think it's calling user privs as well, but I'm testing it as a sysadmin, and it's still failing.  I've also tested it as other users just to check.


    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

  • 2012년 4월 13일 금요일 오후 7:00
     
     답변됨

    Hi Wayne,

    Couple of things to check:

    1. Related to async/sync services, verify the permissions for required user of crmapppool or running user of async service (should be a part of ). This post contains quick steps to verify.

    http://nishamal-crm.blogspot.in/2012/02/error-you-do-not-have-necessary.html

    2. Incase your workflow is leading to a plugin trigger, then it must be doing an operation which might be requiring admin rights. You may change the user to user having admin rights in the Step of your plugin.

    Let me know if this helps you to resolve your issue.

    Thanks,


    Anubhav Bajpai

    • 답변으로 표시됨 Wayne Walton 2012년 5월 23일 수요일 오후 9:09
    •  
  • 2012년 4월 13일 금요일 오후 7:33
     
     

    Hi Wayne,

    Couple of things to check:

    1. Related to async/sync services, verify the permissions for required user of crmapppool or running user of async service (should be a part of ). This post contains quick steps to verify.

    http://nishamal-crm.blogspot.in/2012/02/error-you-do-not-have-necessary.html

    2. Incase your workflow is leading to a plugin trigger, then it must be doing an operation which might be requiring admin rights. You may change the user to user having admin rights in the Step of your plugin.

    Let me know if this helps you to resolve your issue.

    Thanks,


    Anubhav Bajpai


    Hi Wayne,

    Although you might be running the plugin as sysadmin, can you verify the async service account user and whether that user is the part of the sysadmin.

    Next, time to move to debug, turn on the tracing service and trace the different steps into a file. This will help to identify the point to which your code is running fine.

    Let me know your progress.

    Thanks,

     


    Anubhav Bajpai

  • 2012년 4월 22일 일요일 오후 3:39
     
     

    Hi Wayne,

    I was the one who originally posted about this problem in the other thread you read. If I remember correctly, it was the user of the async service whose login had expired or changed. When I changed the login, it started to work again so Anubhav is right I think.

    Marc

  • 2012년 4월 23일 월요일 오후 9:26
     
     
    Marc, we're currently using Network Service, so I don't think an expired password would be possible.

    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

  • 2012년 5월 11일 금요일 오후 10:12
     
     

    Wayne, did you ever get this figured out. I am having the same issue and I know it is related to the Auto Number plug-in I am using from codeplex. I removed the step for the entity I was creating with a workflow and it ran just fine, but once the step was back in place it started getting the failed workflows.

    thanks,

    Rob

  • 2012년 5월 14일 월요일 오후 7:32
     
     
    With the codeplex auto-number plugin - if anything else is trying to set the field value in addition to the auto-number from codeplex you will receive a similar error. Can you provide more detail on the error?

    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful. Michael Mayo

  • 2012년 5월 21일 월요일 오후 6:45
     
     
    Anubhav, I think you have the right of it.  I need to verify in production, but that appears to be very close to the issue.

    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

  • 2012년 6월 6일 수요일 오전 5:56
     
     

    Hi Wayne,

    Have you finally solved this? I have exactly same issue as yours. I logged in as admin and running a workflow without any plugin attached. strange thing is I have another similar workflow works just fine in the system.  

    the only differences between these 2 workflows are the worked one was created earlier and it creates contacts from accounts, my not-working one is created yesterday and creates accounts from contacts.

    my async-service is also working under network service role.

    tried to change the workflow owner to other admins and recreated another workflow with no luck.

    thanks,

    Raymond

  • 2012년 6월 6일 수요일 오전 6:51
     
     제안된 답변

    Finally I got this solved by rebooting the Async-Service......

    • 답변으로 제안됨 raymond-wang 2012년 6월 6일 수요일 오전 6:51
    •