sp-starter-kit: Apply-PnPTenantTemplate : Action 1 (joinHubSite) is invalid. Parameter hubSiteId has an invalid value.
Category
- Question
- Bug
- Enhancement
Expected Behavior
Successful deployment of the solution running the command:
PS S:\Downloads\sp-starter-kit-master\provisioning>Apply-PnPTenantTemplate -Path starterkit.pnp
Observed Behavior
The command cancels with the following error:
PS S:\Downloads\sp-starter-kit-master\provisioning> Apply-PnPTenantTemplate -Path starterkit.pnp
Apply-PnPTenantTemplate : Action 1 (joinHubSite) is invalid. Parameter hubSiteId has an invalid value.
At line:1 char:1
+ Apply-PnPTenantTemplate -Path starterkit.pnp
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Apply-PnPTenantTemplate], ServerException
+ FullyQualifiedErrorId :EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.Tenant.ApplyTenantTemplate
Steps to Reproduce Followed all pre-requisite steps in the documentation and starter guide
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23
Based on the error, my next suggest would be to validate you are a term store admin. The message before access denied in the verbose log is reading collabcommunicationsite.json, which is for a site script. It is possible that you are running into a problem adding the site scripts / site designs.
Quick way to test, in PnP PS, connect to your tenant then use the commands: Get-PnPSiteScript and Get-PnPSiteDesign to see site scripts and site designs named similar to: {Company Name} Team Site and/or {Company Name} Communication Site. If these are in your tenant, then the process must be failing during the PnP Sequencing, which first step is to add terms.
If the site designs / site scripts are not there, then the provisioning process is unable to apply general tenant settings, meaning your account must not be a tenant admin, or modern authentication is getting in the way.
Hi all, making possible progress. This error looks to be generated by the site scripts included with the kit. The site scripts are used to apply the app customizer on both comm and team sites related to the kit, as well as create the hub association. The site scripts use an internal token {SiteCollectionId} that is supposed to be replaced. Still investigating where this is breaking down as in my dev tenants I use to test, including one recently created, I am not seeing the general issue myself.
I just tested the starter kit using the latest provisioning template to a fresh SPO tenant, using PnP PS version 3.20.2004.0. I ensured that all pre-reqs had been met from https://github.com/SharePoint/sp-starter-kit#pre-requirements.
The solution provisioned as expected, including the hub association, including without any general errors.
I am not sure why you are receiving this error.
In general, the hub association occurs as part of the provisioning via a provisioning template setting: <pnp:WebSettings HubSiteUrl=“{sequenceSiteUrl:PORTAL}”/>. Best guess at the moment is that either the comm site is not being properly set as a hub site by the provisioning template, or that the hubsiteurl is not yet available. Assuming all pre-reqs are met.
Either the comm
Same experience here.