Question

I have a Designer 2013 Workflow on a subsite (B) that needs to query a calendar on its parent site (A), to see if there is a matching entry in the calendar. If there is no matching entry, I want to create an item on that calendar.

My workflow queries the calendar on A via a REST call to a web service.

When I run my workflow, I get "Forbidden" in the responseCode. I got this before wrapping the code in an App Step, and I am still getting it after configuring both the parent site and the subsite to allow workflows to run using app steps, and adding an app step to my workflow. What am I missing here?

PS- I can confirm that the url to the web service I'm calling works - if I copy it out of the app step and paste it into my browser, I get the results I expect to get from the query.

Was it helpful?

Solution

Thanks all for pointing me in the right direction. The actual solution is that I had to add the app permissions from Subsite A to Site B's app permissions, not just enable app permissions on each site.

OTHER TIPS

This is the REST call that works fine in the browser, it lists all the available items in the list

The browser is using the authentication cookies from the browser, so it is working with your credentials. The workflow is by default using a service account.

You say you have added an App step. Did you go to the other site and configure app permissions? Did you use this URL as part of the process? http://{hostname}/{the Site Collection}/_layouts/15/appinv.aspx

See this article for details on setting up the app permissions:

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/create-a-workflow-with-elevated-permissions-by-using-the-sharepoint-workflo

This link has a working solution for your issue, try it.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top