I am trying to query the user profile service in a SharePoint 2013 workflow to retrive some properties. I am getting a valid response but unable to parse the json into workflow variables.
I am using httpsend to issue a GET call to url
http://<site>/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)/UserProfileProperties?@v='Domain\UserName'
I am getting back a valid response, which looks like below
{
"d":
{
"UserProfileProperties":
{
"results":
[
..............
,{
"__metadata":
{
"type": "SP.KeyValue"
},
"Key": "AccountName",
"Value": "Domain\UserName",
"ValueType": "Edm.String"
},
{
"__metadata":
{
"type": "SP.KeyValue"
},
"Key": "FirstName",
"Value": "UsersFirstName",
"ValueType": "Edm.String"
},
......
]
}
}
}
Now I am trying to extract values like firstname, manager properties. I used the GetDynmaicValueProperties
and stored the value of d/UserProfileProperties
into another dynamicvalue variable. I then tried to look on that variable to extract necessary information, but does not seem to be working.
When I loop on d/UserProfileProperties/results
, I get each item as
{"__metadata":{"type":"SP.KeyValue"},"Key":"FirstName","Value":"UserFirstName","ValueType":"Edm.String"}
How do I extract values from the json array structure (shown above).