Delegate all workflow tasks from one user to another user.


public string[] DelegateAllTasks(
	string currentUser,
	string newUser,
	bool sendNotification,
	string comments,
	bool global


Type: System.String

Optional. The user from which to delegate workflow tasks.

Note: Although the parameter is optional, an error occurs if a value is not specified.

Type: System.String

Optional. The user to which to delegate workflow tasks.

Note: Although the parameter is optional, an error occurs if a value is not specified.

Type: System.Boolean

Required. Set to true to send a notification message to the user specified in newUser, indicating that tasks have been delegated to the user; otherwise, set to false.

Type: System.String

Optional. Comments to include in workflow history about why tasks were delegated.

Type: System.Boolean

Required. The scope of the delegation. If set to false, only tasks in the current SharePoint site are delegated; otherwise, all tasks in the entire SharePoint farm are delegated.


Type: String[]

An array of error messages indicating any tasks that failed to be reassigned. If all tasks are successfully reassigned, an empty array is returned.


If the Allow long term task delegations global setting is set to No, an error occurs.

The current user is determined by the credentials of the user context specified when this method is invoked (and should not be confused with the value of the currentUser parameter.)

Depending on the value of the global parameter, the current user must have appropriate permissions to invoke this method. If global is set to true, the current user must have farm administrator permissions; otherwise an error occurs. If global is set to false, an error occurs if the following requirements are not met:


The following example demonstrates how to use this operation to delegate all tasks on the current site for the current user to a new user.


The following SOAP request attempts to delegate all the tasks on the current site from the current user to the new user, without notifying the new user.

<soap:Envelope xmlns:soap="" xmlns:nin="">
         <nin:comments>Delegating all tasks from testuser to differentuser.</nin:comments>


The following SOAP response indicates that all tasks for the current user have been successfully delegated to the new user.

<soap:Envelope xmlns:soap="" 
      <DelegateAllTasksResponse xmlns="">

See Also


Delegating workflow tasks





Web Service Reference