1

I'm looking for some help with a REST call I'm attempting to make in SharePoint Designer 2013 Workflow. The site is on SharePoint Online.

The call is to get info related to a specific user account.

The call I am using is this: <site url>/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i%3A0%23.f|membership|example@example.com'

If I manually append this call to the site I am building the workflow for in the browser, I get the required info back. However if I do the exact same call in a workflow "Call HTTP Web Service" action, in an app step, I get an "Unauthorized" response from the call.

I have granted permissions to the workflow app using the app ID with a permissions request of:

<AppPermissionRequests><AppPermissionRequest Scope="http://sharepoint/sitecollection/web" Right="FullControl" />
</AppPermissionRequests>

I have attempted to add an empty "Authorized" header in the call as some posts have suggested this and that caused a "Forbidden" response.

Any help or feedback on this would be great. Please let me know if more info is required.

Thanks

  • You write that you used Authorized. I use an empty Authorization string in the headers. Don't know if that's the cause – Gyonder May 4 '16 at 8:22
  • Yes sorry thats what I meant, will update my question. I am using an empty Authorization string :) – Peter-Ross Cuthbert May 4 '16 at 9:25
0

Apart from the Authorization empty in the RequestHeaders , set Content-Type and Accept

to

Accept : application/json;odata=verbose
Content-Type : application/json;odata=verbose

Check this for more info

Check in the web service properties that the RequestHeaders points correctly to your dictionary that contains (Authorization,Content-Type and Accept). It happened to me that I absend-mindedly put it in ResponseHeaders

  • Thanks for the reply. This causes the exact same Unauthorized error in the response code returned by the call unfortunately. – Peter-Ross Cuthbert May 4 '16 at 9:50
  • Maybe you could try with a rest service that don'require accountName like the one in the url I wrote. Just to restrict the problem. – Gyonder May 4 '16 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.