0

We created a custom permission level which mimic the built-in Contribute permission level but without the ability to delete items and versions:

User's image

our intention was to prevent users from moving folders and deleting folders, but currently users can not rename files. So what are the approaches we have to allow users to rename files but not to delete them?

Second point, is developing a remote event receiver the only way to achieve this?

Thanks.

1 Answer 1

2

Unfortunately, this is a default behavior in SharePoint. You need Delete permissions on items/files if you want to rename those.

This behavior corresponds to user's experience on Windows file servers or when users access to a SharePoint web server through Explorer View (WebDAV HTTP protocol extension).

You can find this information in Microsoft official page at: Contributor users are not able to rename items in SharePoint if the Delete permission level is removed from the Contributors group

Also, check below similar threads for more information:

  1. Why delete permission is required to rename a document in SP Document Library?
  2. Rename a file - Without Delete permission
  3. Permission Level which doesn't allow renaming file in document library

If you want to avoid deletion of files, developing a remote event receiver is the better solution for this case.

SharePoint online also supports Webhooks (I have never used those before). Check below Microsoft official documentations to see if those can work for your requirements:

  1. Overview of SharePoint webhooks
  2. SharePoint list webhooks
3
  • but webhooks runs after the action is already done, so it will not be helful in my case to prevent deletion Commented Jul 20, 2023 at 10:01
  • 1
    then you have to use the event receiver only. Commented Jul 20, 2023 at 10:15
  • but have you done this before? or SharePoint will also fire ItemDeleting remote event receiver when renaming files? so we will not be able to differentiate if the action inside the remote event receiver is actually a rename or a delete? Commented Aug 22, 2023 at 7:53

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.