Will Queries Work if I do Not Have Permission to the List?

  • 17 February 2017
  • 7 replies
  • 3 views

Badge +7

Just wondering. If I initiate a workflow and I do not have access to a list that the workflow queries, will the workflow fail?


7 replies

Badge +16

Cannot test this right now but I am fairly sure it will either fail or return no values from the query list action.

if you want to guarantee permissions at certain parts of your workflow you can wrap actions in an "action set" and choose to run that action set and it's contents with the workflow owner permissions.

Badge +16

I will test this when I get online later just for completeness and keep you posted.

Badge +7

I tried testing it with my test ID and I can't rely on those results. I secured the library to exclude my test ID, I logged in with my test ID, and I could still access the library. I will try testing it as well in other parts of our environment.

Badge +16

OK so I have done the following test.

User A has contribute access to the list that the workflow is on, but no access whatsoever to the list that the workflow is querying.  The workflow completed without error, but the collection returned from the query was empty.

User B has full control to the site and published the workflow in the first place.  The workflow completed without error and the collection returned all items as expected. 

Badge +16

oh and just to be clear for completeness sake; as user A I also tried to navigate to the list that the workflow was querying and got

Sorry, you don't have access to this page

Badge +7

Very interesting. Thank you so much. We added the user to the list that the workflow queried, restarted the workflow, and it was successful.

This is good to know.

Badge +16

Yes and now I have learnt something too happy.png  Glad you're all sorted.

Reply