Description
Reporting an Issue or Missing Feature
we are unable to call the "Set-PnPSiteVersionPolicy" using the service principal. But we are able to call the Get-PnPSiteVersionPolicy using the service principal.
Expected behavior
Able to set the Site Version Policy using the Service Principal
Actual behavior
Steps to reproduce behavior
Please include complete script or code samples in-line or linked from gists
Import-Module "C:\Program Files\WindowsPowerShell\Modules\PnP.PowerShell\2.99.177\Pnp.PowerShell.psd1" -Force -DisableNameChecking
$siteUrl = ""
$clientId = ""
$thumbprint = "****************"
$tenant = ""
Connect-PnPOnline -Url $siteUrl -ClientId $clientId -Thumbprint $thumbprint -Tenant "$tenant.onmicrosoft.com" -ValidateConnection
Get the versioning policy of the site
Get-PnPSiteVersionPolicy
Set-PnPSiteVersionPolicy -EnableAutoExpirationVersionTrim $false -MajorVersions 300 -MajorWithMinorVersions 20 -ExpireVersionsAfterDays 0
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable
)
2.99.177 nightly PnP.PowerShell
Which operating system/environment are you running PnP PowerShell on?
- [X ] Windows
- Linux
- MacOS
- Azure Cloud Shell
- Azure Functions
- Other : please specify