Skip to content

[BUG] Can't empty recycle bin of personal sharepoint #5160

@FlorianTschimbenCoolorange

Description

Hello, I want to move the items in my recycle bin to my secondary-stage recycle bin with a script:
For the Connection to the personal sharepoint I used my personal Account and the following Cmdlet:
Connect-PnPOnline -Url "https://<tenant>-my.sharepoint.com/personal/<site>" -ClientId $clientId -Tenant $tenantId -DeviceLogin.
This works fine.
Then the command to execute would just be Move-PnPRecycleBinItem -Force (but it throws the Error Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))).
The Entra ID has the Sharepoint API permissions: Sites.FullControl.All, Sites.Manage.All, Sites.Read.All, Sites.ReadWrite.All, Sites.Selected

I can access the normal files in the personal Sharepoint just fine, but when I try to do something in the recycle bin I always get the same Error.

What is the version of the Cmdlet module you are running?

3.1.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions