Getting Manager Name from SP.UserProfiles.PeopleManager REST API using Sharepoint Designer Workflow 2013

I want to get the Manager Name using Sharepoint UserProfile REST API in Sharepoint designer Workflow 2013 by using "Call Http Webservice" action with url http://<site_URL>/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='Manager')?@v='domain\username' and i am able to get the result in JSON format

{"d":{"GetUserProfilePropertyFor":"domain\username"}}.

But I am not able to read the output thro' Dictionary.

Pls let me know how to implement in Sharepoint designer workflow for reading Sharepoint UserProfile REST API JSON output.

Thanks

Rajkumar V


  • Edited by Rajkumar VN Thursday, November 28, 2013 3:04 PM
November 28th, 2013 2:49pm

Hi,

According to your post, my understanding is that you want to output the JSON data through a Dictionary.

In order to achieve that, we can add a Build Dictionary action and add variables to the dictionary.

More information are provided in the links below:
http://rogereriksen.wordpress.com/2013/05/24/create-a-sharepoint-site-using-rest-in-workflow-with-sharepoint-designer/
http://fabiangwilliams.wordpress.com/tag/json/

Best Regards

 
Free Windows Admin Tool Kit Click here and download it now
November 29th, 2013 8:01am

There is a action available To get

 manager name outofbox in SharePoint designer.

November 29th, 2013 8:22am

Hi,

Thanks for reply, Here I am using Sharepoint 2013 Workflow Type. So pls tell me how to get the value from JSON output.

For list item we can use  "d/results(0)/Title" to get value from Title column. Like this way what will be the syntax for getting value form "GetUserProfilePropertyFor" REST API using Sharepoint Designer Workflow 2013 Type.

I got the JSON format as mentioned below (taken from fiddler), but not able to get using Sharepoint Designer Workflow Action "Get an Item from Dictionary".

{"d":{"GetUserProfilePropertyFor":"domain\username"}} - JSON output

Free Windows Admin Tool Kit Click here and download it now
November 29th, 2013 9:51am

Hi,

I got resolved the issue by following steps:

  1. URL to get User Manager "http://<site_URL>/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='Manager')?@v='domain\username' " in "APP Step"
  2. Use "d/GetUserProfilePropertyFor" in Get item from a dictionary action
  3. Added "Authorization" Request Header with empty value to avoid "Unauthorized" issue in "App Step"

Thanks for the Support.

November 29th, 2013 11:29am

I have a challenge question for this:

I'm doing this against O365 SharePoint cloud site.  How does one form the Authorization header in this case?  O365 cloud means federated authentication.  Is it still "Basic" or something else?  does it take the same form?  I've already tried putting a cookie in place with FedAuth and rtFa - no good there. 

Free Windows Admin Tool Kit Click here and download it now
December 12th, 2013 3:16pm

Hi Rajkumar,

I've been working on this issue for a long time and still fail.

I also post a article in the forum: http://social.msdn.microsoft.com/Forums/sharepoint/en-US/da02f0b0-a690-431b-9406-a3fe36a732a3/how-to-use-http-web-service-action-of-sharepoint-2013-designer-to-get-userprofiles?forum=sharepointcustomization#da02f0b0-a690-431b-9406-a3fe36a732a3

Could you please help me to see what's wrong with me?

Thank you!!

January 7th, 2014 9:29am

Hi

I need to get the manager of the current user. so I tried with below web service call

https:<siteUrl>/_api/SP.UserProfiles.PeopleManager/GetMyProperties/ExtendedManagers

for testing I tried it in the browser and it returns:

{
    "d": {
        "ExtendedManagers": {
            "__metadata": {
                "type": "Collection(Edm.String)"
            },
            "results": [
                "i:0#.f|membership|XXXXXX@xxxx.com"
            ]
        }
    }
}

can anyone help me to get the XXXXXX@xxxx.com (result) into a SPD workflow variable using "Call HTTP Web service" Action.

Thanks

Free Windows Admin Tool Kit Click here and download it now
March 24th, 2015 1:39am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics