May 23 2023 03:10 PM
I'm getting "Access denied" when using Remove-PnPFileVersion, even though I've got no problem deleting the entire file with Remove-PnPFileListItem
May 24 2023 12:59 AM
@OmarSeri What permissions you have on the document library and SharePoint site?
Try using Site Collection Administrator (SCA) account.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
May 24 2023 04:19 PM
What permissions you have on the document library and SharePoint site?
Because we are talking here of a SharePoint created automatically with related Team, Document library inherits from parent (SharePoint site I think).
When I "Verify permissions" in SharePoint Site, I have Total Control from Owners group, and Modification from Members group.
But what it looks weird is that I have no problem using Remove-PnPListItem: the command deleted all files without notifying any permission issue.