Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

cant generate site provisioning template on a specific tenant #2810

Open
get-mrsmit opened this issue Nov 26, 2020 · 1 comment
Open

cant generate site provisioning template on a specific tenant #2810

get-mrsmit opened this issue Nov 26, 2020 · 1 comment

Comments

@get-mrsmit
Copy link

#2482 ## Environment
[X] Office 365 / SharePoint Online

Expected or Desired Behavior

With the SharePointPnPPowershellOnline module version 3.26.2010.0
Generate a site template with extension .XML

Steps to Reproduce

###built a connection to the sharepoint site where a template must be generated
$siteurl = "https://tenant.sharepoint.com/sites/templatesite"
Connect-PnPOnline -Url $siteurl -UseWebLogin

generate a provisioning template

$filename = "C:\temp" + "SiteTemplate.xml"
try{
Get-PnPProvisioningTemplate -Out $filename -ErrorAction Stop
}catch{
Write-Error $_
}

Extra information

So this issue occurs on one specific tenant,
i have for my self 1 devops tenant and at my company we have 3 extra test/demo tenants.
When i do the same thing with the same pnppowershell module no error eccurs.

The error that we getting is
Get-PnPProvisioningTemplate : The remote server returned an error: (403) Forbidden.
At line:1 char:1

  • Get-PnPProvisioningTemplate -Out $filename -ErrorAction Stop -ErrorVa ...
  •   + CategoryInfo          : WriteError: (:) [Get-PnPProvisioningTemplate], WebException
      + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Provisioning.Site.GetProvisioningTemplate
    

PS C:\GITREPO\QS_SVB> $thiserrormessage

The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The remote server returned an error: (403) Forbidden.

@ghost
Copy link

ghost commented Nov 26, 2020

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Nov 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant