Forum Discussion
Get-PnPSiteTemplate: The remote server returned an error: (403) Forbidden
I want to copy one site collection from one tenant to another, so on the source tenant, I created this App Registering and I grant it full control on SharePoint:-
And I define to use secret for the authentication:-
Then I run this command:-
Connect-PnPOnline -Url "https://****.sharepoint.com/sites/****Integration" -ClientId "***" -ClientSecret "ptv**"
Connecting with Client Secret uses legacy authentication and provides limited functionality. We can for instance not execute requests towards the Microsoft Graph, which limits cmdlets related to Microsoft Teams, Microsoft Planner, Microsoft Flow and Microsoft 365 Groups. You can hide this warning by using Connect-PnPOnline [your parameters] -WarningAction Ignore
then i got this error, when i tried to Get the site template:-
Get-PnPSiteTemplate -Out "Integration.xml" Get-PnPSiteTemplate
: The remote server returned an error: (403) Forbidden.
Any advice? i remember i did this operation 1 year ago and it worked well.
Thanks