I would like to disable/hide delete link for couple of lists. I can easily do with SP scripts but not using PnP/CSOM. Last I looked AllowDelete is not available in the SharePoint.Client library.

Does anyone know a PnP workaround. Thanks


Break the permissions and use a modified version of "Contribute" where delete has been removed as shown here https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/add-pnproledefinition?view=sharepoint-PS Example 2

  • Thanks Kasper. Can't do that the user's they need to be able to delete items. What I am hoping to do is stop content admins from accidentally deleting lists – user3799810 Jul 28 '19 at 10:49
  • Ok, how about breaking the permissions on those specific lists and making the content admins Contribute. Then only the site collection owners will be able to delete the lists. – Kasper Bo Larsen Jul 28 '19 at 15:10
  • Unfortunately for us content admins are also site collection admins/owners. Which is why we want to remove the delete link altogether. I can do it with SP scripts just not with PnP – user3799810 Jul 28 '19 at 20:06

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.