Question

I have a group of users with edit without delete permission. And I am creating an approval workflow that allows these users to request for the deletion of files. The flow starts well once the admin accepts the request it throughs error on Delete file action (Access denied. You do not have permission to perform this action or access this resource. clientRequestId:)

enter image description here

Was it helpful?

Solution

In the delete file action, the connection you choose should have enough permission in the site collection. Please check.

OTHER TIPS

I couldn't reproduce your scenario. But the following scenario worked for me.

SharePoint

  1. The SharePoint Doc Library has a column named [Status] with choices: Approve, Complete, and Delete. The users, who don't have permission to delete documents from this library, will submit a deletion request by changing the status of the document to "Delete"
  2. A MS Flow/Power Automate, When an item is created or modified, will starts since status being modified
  3. Within the flow, if the condition is met, the request is sent to the approver defined in the Flow, and will act on the request (Approve or Reject). If approved, document is deleted from the library using "Delete file" action in the Flow.

MS Flow/Power Automate

The Flow uses a SharePoint Connection with a user account that has permission to delete documents from the library.


Screenshots showing actions that worked

enter image description here

In my case, the approver user doesn't have document Delete permission But the SharePoint connector user does have Delete permission enter image description here

I've tested exactly how your workflow is designed. However, couldn't reproduce the error. The only question now I have is how your flow is being triggered? I've added a column and added JSON format string to trigger the flow. Could you describe how are you triggering the flow?

JSON used to trigger "For a selected file"

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "button",
  "txtContent": "Request Deletion",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"0e7a1b3f-c4e6-4840-bfe5-e80b1c283e2e\"}"
  }
}

enter image description here

SharePoint/Flow User Conditions

  1. The users requesting deletion doesn't have Delete permission, but has Edit permission
  2. The users approving the deletion doesn't have Delete permission
  3. The flow is running with the Owner account, that is, who developed the Flow This Flow Owner has Full Control permission to the library

Screenshot showing the deletion success enter image description here

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