How to retrieve data from SharePoint User Profile?

Last Update: December 26, 2018

Apply for: SPARK Workflow for SharePoint 2013/2016 and Office 365

Suppose you want create a list workflow to retrieve information of the currently logged in user (initiator) from the SharePoint User Profile. This workflow starts when adding a new item to the list.

Here are the steps on how to do that.

  1. Create a new list workflow. For more details on how to create a list workflow, refer to Create a list workflow use case.
  2. Drag activities onto the workflow canvas and drop it onto a design node as follows:
    How to retrieve data from SharePoint User Profile1.png
  3. Configure "User Profile" activity as follows:
    How to retrieve data from SharePoint User Profile2.png
    Note: The following workflow variables should be created:
    • varFirstName of type Sigle line of text
    • varLastName of type Sigle line of text
    • varWirkEmail of type Sigle line of text
  4. Configure "Create History Log" activity as follows:
    How to retrieve data from SharePoint User Profile3.png
  5. Publish the workflow by clicking on the Publish button in the workflow ribbon.
  6. Now you can test the workflow by adding a new item to the list that this workflow being created on.