Thursday, February 21, 2013

MS CRM 2011 Workflow Does Not Send Email - user does not have send-as privilege



Most often you will have workflows that create and send email activity in MS CRM. If the Email’s From is set as a CRM User apart from the Owner of email’s regarding then you will find the emails are not send and stays waiting in System jobs.
You will also see the workflow message stating that “user does not have send-as” privilege. In this case, you need to follow these procedures:
1.       Log into CRM as the owner of the workflow
2.       Go to “File – Options – Email tab”
3.       Check the box “Allow other Microsoft Dynamics CRM users to send e-mail on your behalf”

If this does not work, then we need enable the same for Owner of email’s regarding
1.       Log into CRM as the owner of the email’s regarding
2.       Go to “File – Options – Email tab”
3.       Check the box “Allow other Microsoft Dynamics CRM users to send e-mail on your behalf”

This should work. Since workflow can set emails regarding owner as any CRM user. In this case all the user needs to change their user settings to enable “Allow other Microsoft Dynamics CRM users to send e-mail on your behalf”.
MS CRM does not have UI where the administrator can enable this for all users. Thus we can achieve the same through updating the user settings by CRM SDK for required users.

Entity systemuser = new Entity("usersettings");
//Provide the ID of the user for whom this privilege need to be enabled.
systemuser["systemuserid"] = <USER GUID>;

// Enable the Allow other Microsoft Dynamics CRM users to send e-mail on your behalf.
systemuser["issendasallowed"] = true;


_serviceproxy.Update(systemuser);



Note: This can be done for both MS CRM online and on premises. Please do not update SQL DB directly as they are unsupported. As I see me many blog’s suggesting to directly update the user settings Table SQL.

No comments:

Post a Comment