CRM 2011 Workflow -User does not have the privilege to act on behalf another user. RRS feed

  • Question

  • Hi All,

              I have an workflow which is used to update all the field.. Its working fine in CRMadmin, but its showing Error from user end. Please find the error below.

              I tried changing Act on behalf of Another User in Busineess unit Tab in Security roles, but too its not working.

             Request you to help as soon as possible. Thanks in Advance.

    Plugin Trace:

    [Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.UpdateEntity]


    Error Message:

    Unhandled Exception: Microsoft.Crm.CrmException: User does not have the privilege to act on behalf another user.
       at Microsoft.Crm.BusinessEntities.SecurityLibrary.VerifyUser(Guid user, ExecutionContext context)
       at Microsoft.Crm.BusinessEntities.ExecutionContext.SetCaller(Guid callerId, Boolean setCallerLanguage, Boolean verifyUser)
       at Microsoft.Crm.BusinessEntities.ExecutionContext.OnBeginRequest(Guid userId, Boolean startTransaction, IsolationLevel isolationLevel, ExecutionOperationContext operationContext, CallerOriginToken originToken)
       at Microsoft.Crm.Workflow.WorkflowTransactionContext.OnBeginRequest()
       at Microsoft.Crm.Workflow.Services.ActivityServiceBase.ExecuteInTransactedContext(ActivityDelegate activityDelegate)
       at Microsoft.Crm.Workflow.Services.UpdateActivityService.UpdateInternal(Entity entity, String stepId)
       at Microsoft.Crm.Workflow.Services.UpdateActivityService.ExecuteInternal(ActivityContext executionContext, UpdateEntity updateEntity)
       at Microsoft.Crm.Workflow.Services.UpdateActivityService.Execute(ActivityContext executionContext, UpdateEntity updateEntity)
       at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
       at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

    Wednesday, July 17, 2013 1:44 PM

All replies

  • Hi,

    Did you registered the plugin in the running user or specific user's context? If it is the running user, then, in addition to act on behalf privilege, he/she should have enough privileges to do the update or create actions. For example, if you updated an entity or assigned it, the current user should have the write and assign privileges on that entity to be able to use the plugin. If the audit logs is not important for you and it does not matter who changed the records through plugin, you could use an admin account in the running context of the plugin. Give this suggestions a try and let me know the results.

    My Weblog | My Website

    Wednesday, July 17, 2013 2:32 PM
  • Hi Payman,

             I didnt use Pluggin Code still, I Just used ON DEMAND Workflow and i share it with the User. At that time am getting this error

    • Edited by rampprakash Wednesday, July 17, 2013 2:50 PM fasdf
    Wednesday, July 17, 2013 2:48 PM