I'm currently using the WebMethod "DelegateAllTasks" but I'm having an issue using it because I don't want to delegate ALL the tasks of a specific user.
So I watched the WebMethod "DelegateTask" but it's only working for the current user.
Is there a way to delegate a single task from a specific user to a specific user?
Solved! Go to Solution.
my understand is that "DelegateTask" is exactly what you are looking for. The Web Service Reference says:
The current user is determined by the credentials of the user context specified when this method is invoked. If the credentials of the current user context cannot be determined, an error occurs.
If the credentials of the current user context matches one of the approvers, assignees, or reviewers specified by the workflow action that created the task item, the method checks if the current user is allowed to delegate the task. If the current user is not allowed to delegate the task, an error occurs.
If the credentials of the current user context do not match any of the approvers, assignees, or reviewers specified by the workflow action that created the task item, an error occurs if the following requirements are not met:
The current user has site administrator permissions.
Specifically, the current user must have the following base permissions for the current SharePoint site: AddAndCustomizePages, BrowseDirectories, ManagePermissions, ManageWeb, Open, and ViewPages. For more information about SharePoint base permissions, see SPBasePermissions enumeration on Microsoft Developer Network.
The Allow site administrators to set long term delegation for other users global setting is set to Yes.
Which means the "Current User" is the one you provide when calling the web services method (the credentials you have to provide). As long as this user has sufficient permissions (see reference) you should be able to delegate one specific task to a user of your choice.
I didn't know I could set a context with a specific user, thank you.
So the only thing I need to do is to put the specific user to site administrator, set a context with him, call the "DelegateTask" and remove him from site administrator.
Thanks a lot.