Sp-starter-kit: New-PnPSite @hubParams fails

Created on 8 Jun 2018  Â·  12Comments  Â·  Source: pnp/sp-starter-kit

Category

  • [x] Question
  • [x] Bug
  • [ ] Enhancement

Expected or Desired Behavior

I've setup my tenant and my machine (at least I think so) accordingly to the documentation and sadly enough I was able to create site collections yesterday, but not anymore. When executing .\deploy.ps1 I'm expecting the hub site, marketing and hr sites to be created. I'm using a tenant from demos.microsoft.com to make sure I have all required permissions.

Observed Behavior

Running deploy.ps1 throws an error in https://github.com/SharePoint/sp-starter-kit/blob/00a5081e854f2ebc40ccd0687d60dfdb143b9c43/provisioning/functions.ps1#L174 with the following return message:

New-PnPSite : {"d":{"Create":{"__metadata":{"type":"SP.Publishing.CommunicationSiteCreationResponse"},"SiteStatus":3,"SiteUrl":""}}}
At C:\Setup\sp-starter-kit-master\provisioning\functions.ps1:174 char:13
+             New-PnPSite @hubParams
+             ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [New-PnPSite], Exception
    + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.NewSite

$hubParams looks like this:

Name                           Value
---                           -----                                                                                                                                                          
Connection                     SharePointPnP.PowerShell.Commands.Base.SPOnlineConnection                                                                                                      
Title                          PnP SP Starter Kit                                                                                                                                             
Url                            https://m365x445956.sharepoint.com/sites/DEMO_portal                                                                                                           
Description                    PnP SP Starket Kit Hub                                                                                                                                         
Type                           CommunicationSite 

I couldn't find out what SiteStatus 3 could mean, but I've tried for 4 hours to get it up and running without sucess.

Steps to Reproduce

Running the deploy script against my tenant results in no site created at all. If I run the following command it's working just fine.

New-PnPSite -Type CommunicationSite -Connection $connection -Title "TestCommunicationSite" -Url "https://m365x445956.sharepoint.com/sites/MyModernCommSite" -Description "description"

I used Beau Camerons blog without luck. Thanks for your help

Most helpful comment

Finally I was successful in deployment. My steps:

  1. double check that your recycle bin is empty or change prefix name to something else i.e. "MyDemo"
  2. double check if you have full rights to TermStore
  3. following instruction and before deployment you have uploaded .sppkg package ..in this case I used $SkipSolutionDeployment parameter

Site is really nice :)

All 12 comments

Hello Beau,
I don't have any other tenant with required permissions and settings. Yes I
can confirm I'm connecting to the root site and I've found this issue
https://github.com/SharePoint/PnP-PowerShell/issues/1542 where someone has
a similar issue.

All my tenants are german and there are other issues regarding non english tenants

On Wed, Jun 13, 2018 at 12:56 AM Beau Cameron notifications@github.com
wrote:

@andreasblueher https://github.com/andreasblueher When you run this
against your tenant and not demos.microsoft.com do you receive the same
error, or just no sites?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SharePoint/sp-starter-kit/issues/19#issuecomment-396760330,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AL9qALXFgTJKmnpFTxZy6_uIJJryzdR-ks5t8EccgaJpZM4UgC4O
.

Hi,
my tenant is english and I have the same issue.

Name Version
---- -------
SharePointPnPPowerShellOnline 2.27.1806.0

@andreasblueher @marekskalinski I have confirmed the issue you are seeing. I was able to repro by running the deploy.ps1 file. Subsequently I would delete the site collections that were created. I would confirm the site collections are gone by navigating and receiving a 404.

I would then re-run the deploy.ps1 and I would receive the same error, even though the /demo_portal , /demo_hr, /demo_marketing sites were deleted.

I even test without the deploy.ps1 and just ran the New-PnPSite command using the same URL of the deleted sites, I received the same error.

There appears there might be a site creation issue after a freshly deleted communication site.

Can you try to deploy the solution into a new -SitePrefix parameter using the following command. This will create the sites using your defined prefix instead of /Demo_Portal.

.\deploy.ps1 -TenantUrl https://YourTenant.sharepoint.com -SitePrefix MyDemo

This does most likely relate on URL overlaps which then is causing issues. If you use the -SitePrefix Contoso switch in the deploy.ps1, that should resolve the issue. We will work on with the scripts on having a better check for the existing instances to avoid URL overlaps.

I can confirm that it is related to the SitePrefix being used before, BUT this also true for sites which have been deleted almost a week ago. So I was able to create new sites now.

Not sure if this is worth another issue and if it's related to the starter kit at all, but all hub site associations remain existing, even though all of the hub sites have been deleted already.

Also it works for me but unfortunately site is not complete and few webparts missing (screen attached) i.e. tiles
capture

Also during provisioning I have an error:
Apply-PnPProvisioningTemplate : Access denied. You do not have permission to perform this action or access this resource.
At C:\temp\Scripts\sp-starter-kit-master\provisioning\deploy.ps1:95 char:5

  • Apply-PnPProvisioningTemplate -Path "$PSScriptRoot\solution.xml" ...
  • ~~~~~~~~~~~~~

    • CategoryInfo : WriteError: (:) [Apply-PnPProvisioningTemplate], ServerUnauthorizedAccessException

    • FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate

I modified solution.xml file with URL to my app catalog and I think script go forward, but still there is an error
capture

Hi, I also ran into this issue on my first couple of runs at installng the Starter Kit, with an exception being thrown by the call to New-PnPSite.

Unlike the classic New-PnPTenantSite cmdlet, it doesn't have a -RemoveDeletedSite switch parameter.

I ended up running the following PowerShell to list and selectively clear out my deleted sites, I was then able to run the deploy.ps1 script happily. Get-SPODeletedSite | foreach { Remove-SPODeletedSite -Identity $_.Url }

There are some fantastic examples in this solution so thanks to everyone for putting this together!

Finally I was successful in deployment. My steps:

  1. double check that your recycle bin is empty or change prefix name to something else i.e. "MyDemo"
  2. double check if you have full rights to TermStore
  3. following instruction and before deployment you have uploaded .sppkg package ..in this case I used $SkipSolutionDeployment parameter

Site is really nice :)

Finally I was successful in deployment. My steps:

  1. double check that your recycle bin is empty or change prefix name to something else i.e. "MyDemo"
  2. double check if you have full rights to TermStore
  3. following instruction and before deployment you have uploaded .sppkg package ..in this case I used $SkipSolutionDeployment parameter

Site is really nice :)

Hi, I have tried all the steps - My site is same as what you were getting without webparts (new ones, that should install with solution).

Even followed the steps in your last post.

However, i am unable to get App Catalogue work - The Deployed columns always read "No" - and it's not available to be added. Not sure what i am doing wrong ....

Note: Have been trying with two separate environments, and both having same issues.

Any further advise?

@haq82 there have been changes since this was first reported in June. Your issue may be related to recent changes to SPFx. Please review the following: https://github.com/SharePoint/sp-starter-kit/issues/158#issuecomment-424382848

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonasbjor picture jonasbjor  Â·  8Comments

metkhoo picture metkhoo  Â·  5Comments

bergersj picture bergersj  Â·  8Comments

pdemro picture pdemro  Â·  6Comments

dmitryrogozhny picture dmitryrogozhny  Â·  7Comments