3

I have two sharepoint 2013 list workflows created in SharePoint Designer. One exists in the root of the site collection while another exists on a subsite. Through the use of several Call HTTP Web Service actions, the workflow on the root site list creates an item on a seperate list in the subsite

POST to: .../subsite/_api/web/lists/getbytitle('[ListName]')/items 

and then attempts to start the subsite workflow on the newly created list item

POST to: .../subsite/_api/SP.WorkflowServices.WorkflowInstanceService.Current/StartWorkflowOnListItemBySubscriptionId(subscriptionId='[SubscriptionID]', itemId='[NewItemId]')

I am able to create the list item in the subsite, however, the web service call to start the workflow returns an InternalServerError status along with a correlation Id. If I check the SharePoint logs for the correlation Id, I see the following error:

Microsoft.Workflow.Client.WorkflowCommunicationException: The request was aborted: The request was canceled. Client ActivityId : cefbf0c2-e3d0-4d82-9b47-3e2a47be5d6b. ---> System.Net.WebException: The request was aborted: The request was canceled. ---> System.NotSupportedException: Do not know how to create outbound claims for app only identity

Most of what I can find on this error doesn't seem to apply to my situation. For example, in this technet discussion the problem seems to be that the message gets posted to the log many times over, filling the log files up very quickly, and the solution is to reset the log level to the default and restart the workflow management pool. In my case, the message is not filling up the logs and is only associated with the root list workflow attempting to start the subsite workflow, and resetting log levels and restarting application pools hasn't helped any.

Also, if I attempt to invoke the StartWorkflowOnListItemBySubscriptionId web service manually using a tool like Postman there are no errors and the workflow starts as expected.

Things I have ensured:

  • The Workflow Can Use App Permissions site feature is enabled
  • The Workflow app has been granted full control to the scope: http://sharepoint/content/sitecollection/web
  • The Call HTTP Web Service action is wrapped in an app step in the workflow
2
  • How are you getting the subscription id? you'll need to get the GUID of the workflow and the item id you're starting on. Dec 24, 2016 at 19:06
  • I get the subscription ID via a webservice call to the endpoint: .../subsite/_api/SP.WorkflowServices.WorkflowSubscriptionService.Current/EnumerateSubscriptionsByList(guid'[List GUID]'). My workflow iterates over the results until it finds the workflow with the correct title (there is only one that should match it), and saves it to a variable ([SubscriptionID] in the example above) to be used in the building the query string for the StartWorkflowOnListItemBySubscriptionId webservice call. I have used log actions in the workflow to verify that this is the same ID used in my manual tests.
    – xrode
    Dec 29, 2016 at 23:32

1 Answer 1

2

Try removing the call from AppStep. I was running into the same had the same problem and the workflow started when I moved the "call HTTP" outside of the App Step

3
  • How did you ever figure that out? Amazing. Thank you so much.
    – Rothrock
    Sep 6, 2017 at 22:04
  • No worries. My problem is that I need to use an AppStep. It seems that this particular REST API endpoint does not support elevated permissions and I need to grant permissions somewhere, but I don't know where Sep 10, 2017 at 11:57
  • In addition this doesn't work when triggering SP2010 workflows. Then you have to do the "Contribute" trick. Also be aware that the WF is running under a different user: "SharePoint App"
    – M.P.
    Jul 4, 2018 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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