Get User Profile Properties Data in SharePoint Designer 2013 Workflow


Workflows helps SharePoint users to collaborate on documents, list items and to manage tasks by implementing business processes on documents and list items.

Creating and assigning tasks to Manager is a very common scenario in workflows. All the user related information is stored in User profile service application (UPA). Although this sounds very straightforward, getting the user profile properties of the logged in user is very tricky in SPD 2013 workflow.

SPD 2010 supported out of box activity to access user profile fields. However, User Profile service option is not present in SharePoint 2013 Designer workflows.


This article will detail the necessary steps to retrieve user profile properties in a SPD workflow as well as highlight a few common issues you may encounter during development.

Activate site feature - Workflows can use app permissions

  1. Navigate to Site Settings and click Manage site features under Site Actions.
  2. Activate feature Workflows can use app permissions.


Granting the App Permissions

Firstly, we will ensure that workflow has sufficient permissions to access the User Profile Service.

  1. Navigate to Site Settings and click Site app permissions under Users and Permissions.

  2. Make note of the App ID for your Workflow – portion of the Workflow App Identifier between | and @.

  1. With the tenant admin account, navigate to <site-url> /_layouts/15/appinv.aspx

  2. At the appinv.aspx page, fill in the Application ID and click the search button next to the ID box

  3. Copy below xml to Permission Request XML box,
    1. <AppPermissionRequests>  
    2.    <AppPermissionRequest Scope="http://sharepoint/social/tenant" Right="Manage" />  
    3. </AppPermissionRequests>  
  1. Click Create

  2. Click Trust It, when prompted.


Create SharePoint Designer Workflow to Get User Profile Properties Data

For example, we will concentrate on getting the Manager of  a logged-in user.

  1. Open the site in SharePoint designer and create workflow on designed list or document library.

  2. Set up a workflow variable UserName that stores the target user’s login name


  3. We will use the REST API to get UserProfile Properties


    It is better to test the above url in any browser to make sure it returns the Manager


  1. Let’s store the REST API in a variable called RestUrl


  2. We will encode the url as below,


  3. Build dictionary to set up the RequestHeaders


    Set the values as below to dictionary.







    Most simple REST calls from a SharePoint Designer 2013 workflow requires headers are Accept and Content-Type. However, you must explicitly add an Authorization header with an empty string value in order to avoid an Unauthorized response. If you are getting a response of Unauthorized, then make sure you have the Authorization header in this dictionary.

  1. Inside App Step, Add activity - Call Http Web Service to invoke the REST API.


  2. Use workflow activity Get an Item from a Dictionary to read the Manager

  3. Enter d/GetUserProfilePropertyFor for the item name


  4. The workflow variable Manager should get populated with the Manager

Issues and Troubleshoot

Few times, d/GetUserProfilePropertyFor does not return the value for Manager.

To troubleshoot,

Log the HTTP response code to the Workflow History list as a quick way of determining the root cause of the error.

Log the value of ResponseContent


The output will be in the format as below,
To get the Manager value, change the workflow activity Get an Item from a Dictionary as,