Closed WellvanaIT closed 5 months ago
I am also getting the same issue for this template.
Hi, you are targeting the wrong site. You should not connect to the admin site (the one with URL https://tenant-admin.sharepoint.com/). Instead, you should connect to a regular site that you need to create before applying the template. In your scenario, you should create a Communication Site.
If I try not using the SP admin site (which is stated to use here https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/applying-pnp-templates) then I receive an error Invoke-PnPSiteTemplate: Object reference not set to an instance of an object. Anything else to try?
Hi @AliRaeis, I'm sorry but I made a mistake while writing the document that you are referring to. Good catch, thanks! I already fixed the issue and it should become available soon on learn.microsoft.com. Meanwhile, please target the URL of the site when connecting, using a command like:
Connect-PnPOnline https://<tenant>.sharepoint.com/sites/<URL-of-your-target-site> -Interactive
If you do that, it should work as expected. Remember to create the site before connecting to it and before running the Invoke-PnPSiteTemplate
command.
Thanks.
Thank you for clarifying, I can confirm that this has now worked.
Describe the issue We are trying to deploy a new lookbook template on multiple SharePoint sites. We have already installed the module and connected with the sharepoint but when try to give the invoke command we get error of "Access Denied".
Expected behavior We expect that the template "the landing" gets deployed on the site "Wellvana IT"
Screenshots Attached*
Details (please complete the following information):
Additional context Add any other context about the problem here.