Can we allow users to rename files but prevent them from deleting those files inside SharePoint online

john john 986 Reputation points
2023-07-19T23:01:42.36+00:00

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

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

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,036 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,179 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Sandra Bisson 5 Reputation points
    2024-04-16T17:43:08.68+00:00

    I understand that is by design, but we need it! What solutions could be provided?

    1 person found this answer helpful.
    0 comments No comments

  2. Zehui Yao_MSFT 5,871 Reputation points
    2023-07-20T05:31:35.1933333+00:00

    Hi john john,

    I tested it locally and be able to reproduce the same issue. Per our research, this is by design.

    If you uncheck the delete item permission, the rename option will also be removed from the [...] menu.

    If modify the file name through the properties option, a prompt for insufficient permissions is also displayed.

    For the second point, please provide more details about remote event receiver. This way we can do more in-depth troubleshooting.

    image (25)

    image (26)

    image (27)

    image (28)


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. anthony 21 Reputation points
    2024-08-05T05:13:46.4333333+00:00

    Agreed with Sandra, this is fairly restrictive. I think it would make sense to split rename and delete into separate permissions.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.