Workflow failed due to access denied when querying a list


Badge +8

One of the initial steps of my workflow is to query a list for some names and set them as variables I use later in the flow.  This is so that if those individuals change positions or leave the company, the content in the workflow can be adjusted appropriately without someone having to make changes to the workflow.

Recently one of my workflows failed and the error details said : 

Failed to query list data. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

This is not a permissions issue because I was able to start the workflow manually later.  I'm currently under the assumption that this was a momentary hiccup in Sharepoint where the list was unavailable. 

Anyone else run into this?


14 replies

Userlevel 6
Badge +16

So, is it currently working?

Badge +8

It works almost all of the time, but I did get this error again recently, so it's happened a couple times now this month, out of about 20-30 workflow runs in the same period, so call it 10% failure rate?  Not great.

Userlevel 6
Badge +12

Hello Chris Almaguer‌ - 

When  you say:

This is not a permissions issue because I was able to start the workflow manually later.

Does this mean that you are always starting the workflow or are there other users that are starting it as well?

I have seen issues where users do not have the proper permissions on a site/list that is being queried within the workflow, but have the ability to create new items and kickoff workflows.

You can also try to put the Query list action within an Action set and set the actions within to Run as workflow owner.

200919_pastedImage_2.png

Badge +8

This is a good suggestion, but no, it's always either myself or another site owner that's starting the workflow.  The only thing I can think of is that the query that is erroring out is querying multiple values and writing them to multiple variables.  I broke out the query so it's only querying one variable at a time.

This way, I can see WHICH query is causing the error - also if it continues to happen I can add pause actions in between queries to see if that will help.

Badge +8

I actually went to set this setting anyway, and I don't have this option!  (Nintex 2013).

Badge +16

did you try this on a branch of a state machine or other branching action?  this option is only available inside an action set when outside of branching logic - can you confirm?

Badge +8

Actually Jesse, I did find out that I was mistaken, some of the folks getting errors are NOT site owners!  I did enable this setting (my action set was nested, I had to go to the parent), and enabled it.  Thanks!

Badge +8

I didn't think I had it because there was no branching, but the action set was nested in another action set (I had to enable this setting on the parent).

Badge +11

I also face the same issue and I am not able to pin point the problem to why it is causing the query being access denied.

In practical it works great as it been working a lot of times until this issue occurred.

I went ahead and added an Action Set and placed the query within the set and ticked the option "run wf as the owner..."

The workflow now works fine but this does not mean the action set fixed the issue lol

Userlevel 6
Badge +12

‌ - 

This sounds like a permission issue on the list that is being queried. I would start there and ensure that the user executing the action(s) have the proper authority on that list.

Hope this helps!

Badge +8

Jesse is right, I haven't had any issues since I checked "run wf as the owner".  You should be good if you added an Action Set and ticked this box.   

Badge +11

Hello Jesse

In that case since the user is missing the permission then why did it work with every body else?
Just as an information: I have a group called Members where all users are in that group and it has Contribute rights.

As i said, it usually works and never came across this error before.

That made me wonder ...

Userlevel 2
Badge +5

I recently had this issue on SharePoint Online. It was getting an access denied when trying to write to the Workflow History. Giving Contribute rights there allowed the workflow to complete.

Badge +2

Getting the same issue in SharePoint Online. I think, in my case the query builder is failing. I am setting item level permission after creation, I am removing all permission from the item and only owner has access to all items.

Reply