We have a special library where only a select few have access to. Then we learned that those select few can just share a file with anyone. Not good.

I tried creating a custom permission level, but was unsuccesful in creating one that hid the sharing option but maintained editing priviledges.

So I was thinking that maybe a JSON view format could work? Anyone tried that so that sharing is not visible in list view, list options and commmand bar? The user have contribute rights, so perhaps they can just create a new view and the sharing option returns?

Is a field customizer a better solution?

Hope someone can help clarify my options!


  • So for the specific library, you want to users able to edit files while sharing is completely forbidden?
    – Jerry_MSFT
    Aug 15 '19 at 8:33
  • For only one specific library, I suggest apply a custom style sheet or JS to hide/disable Share button.
    – Mark L
    Aug 16 '19 at 9:23
  • @jerry_MSFT, excactly
    – thewolf
    Aug 16 '19 at 12:39
  • @MarkL, we are all modern and cannot apply a custom CSS og JS
    – thewolf
    Aug 16 '19 at 12:40

You may refer to the answer in another thread:

How can we hide New/Upload button in modern document library experience?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.