Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-PnPTenantTemplate : The property or field 'ServerRelativeUrl' has not been initialized. #585

Open
1 task done
sNNNeaker opened this issue Aug 25, 2022 · 3 comments

Comments

@sNNNeaker
Copy link

Category

  • Bug

Describe the bug

Expected or Desired Behavior

Starterkit being installed

Observed Behavior

Invoke-PnPTenantTemplate : The property or field 'ServerRelativeUrl' has not been initialized. It has not been
requested or the request has not been executed. It may need to be explicitly requested.
In Zeile:1 Zeichen:1
+ Invoke-PnPTenantTemplate -Path .\starterkit.pnp
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [Invoke-PnPTenantTemplate], PropertyOrFieldNotInitializedException
    + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Provisioning.Tenant.InvokeTenantTemplate

Steps to Reproduce

Connect-PnPOnline -Url "https://tenant-admin.sharepoint.com"

Environment Details (Development & Target environment)

  • Starter kit version: v2
  • OS: Windows 10
  • Target Environment: SharePoint Online
  • Framework: ?
  • PnPPowerShell Version : 1.11.0
  • Browser(s): Chromium Edge v104
  • Additional details: Prereq done as described in wiki and:
Get-PnPException


Message          : The property or field 'ServerRelativeUrl' has not been initialized. It has not been requested or
                   the request has not been executed. It may need to be explicitly requested.
Stacktrace       :    bei Microsoft.SharePoint.Client.ClientObject.CheckUninitializedProperty(String propName)
                      bei Microsoft.SharePoint.Client.Web.get_ServerRelativeUrl()
                      bei Microsoft.SharePoint.Client.ListExtensions.GetListByUrl(Web web, String webRelativeUrl,
                   Expression`1[] expressions)
                      bei PnP.Framework.Provisioning.ObjectHandlers.Utilities.TenantHelper.ProcessApps(Tenant tenant,
                   ProvisioningTenant provisioningTenant, FileConnectorBase connector, TokenParser parser,
                   PnPMonitoredScope scope, ApplyConfiguration configuration, ProvisioningMessagesDelegate
                   messagesDelegate)
                      bei PnP.Framework.Provisioning.ObjectHandlers.ObjectHierarchyTenant.ProvisionObjects(Tenant
                   tenant, ProvisioningHierarchy hierarchy, String sequenceId, TokenParser parser, ApplyConfiguration
                   configuration)
                      bei
                   PnP.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.ApplyTenantTemplate(Tenant
                   tenant, ProvisioningHierarchy hierarchy, String sequenceId, ApplyConfiguration configuration)
                      bei PnP.PowerShell.Commands.Provisioning.Tenant.InvokeTenantTemplate.ExecuteCmdlet()
                      bei PnP.PowerShell.Commands.PnPSharePointCmdlet.ProcessRecord()
ScriptLineNumber : 1

@ghost
Copy link

ghost commented Aug 25, 2022

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

@ghost ghost added the Needs: Triage 🔍 label Aug 25, 2022
@bcameron1231
Copy link
Collaborator

Will look into this. There may have been updates to the PnP Powershell Module that we haven't reflected in our PnP Templates used in the PnP Starter Kit.

@eoverfield
Copy link
Collaborator

It would also help to have PS debug logging enabled to understand where in the provisioning process this error is being triggered.
https://github.com/pnp/sp-starter-kit/blob/v3/documentation/common-provision-results.md#error-general-cascading-errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants