Introduction
Call HTTP Web Service is a new action, introduced in SharePoint 2013 Designer Workflows. This action allows you to make simple calls to a Web Service easily or, if needed, you can create more complex calls, using HTTP verbs, as well as allowing you to add HTTP headers.
The Call HTTP Web Service action lets you specify any of the several request methods, including GET, PUT, POST and DELETE. This lets you tell the Web Services, specifically RESTful services, what to do on the Service that you’ve specified with the URL property on the activity. For more details, please refer to the link.
In this article, I will be using the list, given below, to create and execute the Workflow.

Endpoint URI
To create a list in SharePoint site endpoint URL will be http://sitename/_api/web/lists.
HTTP Request
POST – To create entities such as lists and sites.
Workflow Design

Forbidden or Unauthorized Issue
When you try to call HTTP Web Service to create list (HTTP POST), you will get the response code as forbidden or unauthorized as shown below. You will get the error, when you try to access the objects in SharePoint, that requires the elevated permissions.
,
By creating a Workflow with the elevated permissions you will be able to solve this issue. You will be performing the following steps:
- Activate Workflows can use app permissions feature.
- Grant full permissions to Workflow
- Develop List Workflow and wrap all the actions inside an app step.
Reference: https://msdn.microsoft.com/en-us/library/office/jj822159.aspx
Activate Workflows can use app Permissions feature
- Click the settings icon and then click site settings, as shown below:

- In the Site Actions section, click Manage Site Features, as shown below:

- Activate the feature – Workflows can use app permissions.

Grant full permissions to Workflow
- Click the Settings icon and subsequently, click Site Settings.

- In the Users and Permissions section, click Site app permissions.

- Copy the highlighted client section of the app identifier.

- Navigate to the Grant permission to an app page, https://sitename/_layouts/15/appinv.aspx.
- Paste the client Id in the app Id and then click Lookup. Title, App Domain and Redirect URL will be automatically populated.

- Paste the following XML to Permission Request XML section to grant full permissions.

- <AppPermissionRequests>
- <AppPermissionRequest Scope="http://sitename" Right="FullControl" />
- </AppPermissionRequests>
- Click Create button.
- Click Trust It button.

Create List Workflow






























Ravi KandelPosted Jul 14, 2016, 11:55 AM
Thanks for sharing.
kalu singh raoPosted Jul 14, 2016, 1:30 AM
Nice...