1

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.

5
  • Remove the Authorization from your dictionary and try it Commented Nov 19, 2019 at 6:57
  • I was still getting zero results when trying it without the App Step. Commented Nov 19, 2019 at 14:46
  • App step is needed for this operation. Commented Nov 19, 2019 at 15:03
  • I do have an app step, and I still get "Forbidden". Commented Nov 19, 2019 at 15:05
  • before the rest call in your workflow, you would have built a dictionary, in that remove Authorization and try it Commented Nov 19, 2019 at 15:08

2 Answers 2

1

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.

0

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.

1
  • I have enabled App permissions on both A and B. Yes, I used the /appinv.aspx page to configure the app permissions. Commented Nov 19, 2019 at 18:43

Your Answer

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

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