SharePoint 2010: Retrieving the Current User in a Workflow

SharePoint 2010: Retrieving the Current User in a Workflow

What to do when you want to determine the current user in a workflow? It’s possible that the workflow runs inside the w3wp.exe worker process, in which case the current user makes sense. But it’s also possible that a workflow runs inside the owstimer.exe process, at a later time. In these cases, the current user doesn’t make sense. Instead, use the workflow originator or initiator.

To get the e-mail address of the originator user:

  • workflowProperties.OriginatorUser.Email  Or workflowProperties.OriginatorEmail

To get the display name of the originator user:

  • workflowProperties.Originator Or workflowProperties.OriginatorUser.Name

To get the login name (format [domain name]\[user name]:

  • workflowProperties.OriginatorUser.LoginName

These techniques can be used in workflows that are created programmatically. In a SPD (no-code) workflow, you can also retrieve the workflow initiator’s e-mail address: use the User Profile web service as a data form web part in the .aspx page of the workflow to get the e-mail address whenever the initiator started the workflow.

Thanks to for the info.

Please note: Also check out the SharePoint 2010 Best Practice Overview page at

Sort by: Published Date | Most Recent | Most Useful
Page 1 of 1 (1 items)