powershell icon indicating copy to clipboard operation
powershell copied to clipboard

[BUG] New-PnPSiteFileVersionExpirationReportJob throws auth error

Open sympmarc opened this issue 10 months ago • 0 comments

This may or may not be a bug, but I've tried everything I can think of to make it work.

I'm trying to run New-PnPSiteFileVersionExpirationReportJob as an SP Admin. I have Site Owner permission to the site I'm trying to run it on.

I'm using Connect-PnPOnline to connect to the site, which is successful.

Image

When I run the cmdlet, I get the following error:

Image

I've also tried New-PnPLibraryFileVersionExpirationReportJob and get the same error.

I've tried making only a single connection to the site in question (no -ReturnConnection)

My question is what permissions I need to run this cmdlet.

Expected behavior

I expect the ReportJob to be submitted.

Actual behavior

See error above.

Steps to reproduce behavior

See screenshot above.

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

2.12

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

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

sympmarc avatar Jan 31 '25 21:01 sympmarc