I am using SharePoint 2013 Online/Office 365. Since I read that the _vin... user profile services through InfoPath are not available for the Office 365 version of SharePoint, I am trying a new approach through a workflow.
The workflow calls the API and is suppose to bring back the cell phone of the user based on the user account, however, each time I try it, I get the following error:
{"odata.error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}
I should have full control however to the entire SharePoint site, so I'm wondering if something is wrong with my call to the API. In the workflow, I am calling the following HTTP Web service:
https://SPSite.com/sites/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='CellPhone')?@v='DOMAIN\user'
and then recording the response from the result. No matter what I try, it is not working. Or is there a better way to do this? Any help would be greatly appreciated!