sharepoint online – 403 while trying to create a pnp privisioning template

Ok this site recently got switched form a modern site to a classic site and now I cannot use anything on the site to include turning on and off features with powershell. This is a sharepoint online site with office 365 permissions. I used to be able to use powershell on this site but now i am only getting a 403 error. Any help would be greatly appreciated.


I enter the URl and credentials without fail, but the minute I run

Get-PnPProvisioningTemplate -Out "example-Template.xml"


Set-PnPList -Identity "Some Library" -ForceCheckout $false

I will get the following error

  Set-PnPList : The remote server returned an error: (403) Forbidden.
At line:1 char:1
+ Set-PnPList -Identity "Some Library" -ForceCheckout $false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) (Set-PnPList), WebException
    + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Lists.SetList

I ran the log against it also and got this error in line one

powershell.exe Error: 0 : 2020-09-16 08:03:52.1674  (OfficeDevPnP.Core) (0) (Error) ExecuteQuery threw following exception: System.Net.WebException: The remote server returned an error: (403) Forbidden.

at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)