I'm trying to get a user's property using a REST call in a Visual Studio workflow.
The rest call:
/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountname='i:0%23.f%7Cmembership%[email protected]',propertyName='Manager')
This works if I simply append it to an URL and returns
The return:
<d:GetUserProfilePropertyFor xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">i:0#.f|membership|[email protected]</d:GetUserProfilePropertyFor>
Now I tried this simple workflow...
...but it won't return the expected value, it's just returning a blank value. My best guess is that my path is wrong, and I should be calling something like d/GetUserPropertyFor/0 or some index?
Update
I got it to work. I messed with the app permissions as well as the API string I was using and all is working perfectly!