PnP-Sites-Core
PnP-Sites-Core copied to clipboard
Header Compact Layout - Invalid Template
Category
- [x] Bug
- [ ] Enhancement
Environment
- [x] Office 365 / SharePoint Online
- [ ] SharePoint 2016
- [ ] SharePoint 2013
Expected or Desired Behavior
Able to set compact header layout for a site using Apply-PnPProvisioningTemplate
.
Observed Behavior
Provisioning templates containing the <pnp:Header>
tag within a <pnp:ProvisioningTemplate>
tag are considered invalid even though this structure directly mimics a retrieved provisioning template.
Steps to Reproduce
Example invalid provisioning template as applied with Apply-PnPProvisioningTemplate
:
<?xml version="1.0"?>
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2018/07/ProvisioningSchema">
<pnp:Preferences Generator="OfficeDevPnP.Core, Version=3.2.1810.0, Culture=neutral, PublicKeyToken=5e633289e95c321a" />
<pnp:Templates ID="CONTAINER-COMPACT-HEADER">
<pnp:ProvisioningTemplate ID="COMPACT-HEADER" Version="1" BaseSiteTemplate="SITEPAGEPUBLISHING#0" Scope="RootSite">
<pnp:Header Layout="Compact" MenuStyle="MegaMenu" />
</pnp:ProvisioningTemplate>
</pnp:Templates>
</pnp:Provisioning>
I have tried using <pnp:Header Layout="Compact"/>
, but this fails also.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Facing the same issue using schema 202002. I get the error
Apply-PnPProvisioningTemplate : AADSTS65001: The user or administrator has not consented to use the application with ID '31359c7f-bd7e-475c-86db-fdb8c937548e' named 'PnP Management Shell'. Send an interactive authorization request for thi s user and resource
When I remove the pnp:header I can provision my template