Dynamics CRM 2011 on premise.
I have a process that is triggered on close of a case/incident and it sends an email from the owner of the case.
The process is owned by Mick. Andy is the owner of a case and closes it.
A job runs and is stuck at Waiting. There's a warning in the job saying
"You cannot send e-mail as the selected user. The selected user has not allowed this or you do not have sufficient privileges to do so. Contact your system administrator for assistance."
With the following stack trace:
Plugin Trace:
[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.SendEmail]
[SendEmailStep7]
Error Message:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: User does not have send-as privilege.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147203059</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>User does not have send-as privilege.</Message>
<Timestamp>2013-09-27T13:55:42.6567419Z</Timestamp>
<InnerFault>
<ErrorCode>-2147203059</ErrorCode>
<ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>User does not have send-as privilege.</Message>
<Timestamp>2013-09-27T13:55:42.6567419Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText>[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.SendEmail]
[SendEmailStep7]
</TraceText>
</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.SendEmailActivityService.<>c__DisplayClass1.<SendEmailInternal>b__0(IOrganizationService sdkService)
at Microsoft.Crm.Workflow.Services.ActivityServiceBase.ExecuteInTransactedContext(ActivityDelegate activityDelegate)
at Microsoft.Crm.Workflow.Services.SendEmailActivityService.ExecuteInternal(ActivityContext executionContext, SendEmail sendEmail)
at Microsoft.Crm.Workflow.Services.SendEmailActivityService.Execute(ActivityContext executionContext, SendEmail sendEmail)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
It would have been really helpful if Microsoft had used the words "Mick" and "Andy", but naturally they used the ambiguous "you" and "selected user" instead.
So, who are "you" and "selected user"?