Forum Discussion
ashmelburnian
Jul 05, 2019Brass Contributor
Prevent deletion of SharePoint files
We had a situation where an end user accidentally deleted thousands for files under a SharePoint document library via OneDrive. The document library itself is accessible to everyone within the co...
- Jul 05, 2019You need to create a new permission role and assign that to users. Go to the SharePoint site permissions, it's under advanced on the home page. Add a role and select just the permissions the user needs and not delete. Now go to library and change the user group permissions to that new role.
CindyZ
Nov 20, 2019Iron Contributor
ashmelburnian I am also facing this same issue in that I'd like to prevent users from deleting files. However, it also seems to prevent their being able to move files.
Could someone please confirm for me those two are also related. Also, what else might be affected if you do not allow delete?
Anyone know of a User Voice to vote for this option. It seems to be a frequent request -- to prevent delete but allow other options.
Thank you in advance for your help, everyone!
collabrius
Apr 16, 2020Copper Contributor
A bit of time has passed since this question, however in my experience the granular 'delete' permission is related to the following actions someone might want to do:
- Delete,
- Rename, and
- Move
NB: as aforementioned by others in this post
When I implemented a delete restriction in document library where I wanted more control I created a workflow to be manually run which allowed someone to provide the new name of the file. It then renamed the file using a specific account that had elevated rights to the library.
That was implemented on-premise and I am yet to re-create this online, however I imagine the logic would work the same.
Hope this helps.
- GS_GordonApr 16, 2020Copper Contributor
collabrius That sounds very helpful for my situation, provided its works online.
Would it be possible to use the same/similar method for moving a file when delete permission is off.
- collabriusApr 23, 2020Copper Contributor
That's a very good question. Moving files is on my radar as a function I need to test for two reasons:
- I like maintaining a single version of the truth, and
- in some environments people keep everything regardless of being deleted, which adds to total capacity
Will let you know how I get on. Once working I will test it with the custom permission level.
Cheers collabrius
- MEMoserNov 10, 2021Copper Contributor
collabriushave you had any success? Our situation is similar but part of our process is to tag metadata on the status of the file (draft, final, archive, etc.) so I'm wondering if is possible to allow deletion based on status - drafts can be deleted, others may not.
We are going to work on several options and my add our findings to this thread.
Best of luck.