An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentException AssignedTo

In this post, we will discuss how to resolve the below issue which comes while running a visual studio workflow for SharePoint online site.

Recently as per our requirements, we were developing few workflows for our SharePoint online site using Visual Studio 2015. In one of the workflow, we were creating various tasks using “Single Task” workflow activity.

But when we run the workflow it gave the below error:

RequestorId: fe62cfea-bccf-5107-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentException: AssignedTo at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity Throw If Sequence Microsoft.SharePoint.WorkflowServices.Activities.OperatingWebContextScope Microsoft.SharePoint.WorkflowServices.Activities.SingleTask Sequence MyCustomTaskFormDemo.MyTestWorkflow.WorkflowXaml_b5a2cce1_a658_4396_a564_84feae343a0b

The error looks like below:

SharePoint online An unhandled exception occurred during the execution of the workflow instance
SharePoint online An unhandled exception occurred during the execution of the workflow instance

An unhandled exception occurred during the execution of the workflow instance

The issue was there with the assignto field where we were assigning the email id for which we need to create the task.

In the Assigned to: filed, I gave a wrong email id.

Example: Instead of giving “[email protected]” I gave with wrong tenant id like [email protected]

Once I gave the correct email id, the issue got resolved.

An unhandled exception occurred during the execution of the workflow instance
An unhandled exception occurred during the execution of the workflow instance

You may like the following SharePoint tutorials:

I hope this tutorial will be helpful to fix error An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentException AssignedTo.

>