pnpframework
pnpframework copied to clipboard
Invoke-PnPSiteTemplate: <pnp:Security> Not Applied to Existing Page
Reporting an Issue or Missing Feature
Invoke-PnPSiteTemplate: <pnp:Security> Not Applied to existing ClientSidePage
Expected behavior
<pnp:Security> would be applied to an existing ClientSidePage
Actual behavior
<pnp:Security> definition is not applied, trace log indicates skipped because overwrite flag not set
Steps to reproduce behavior
- SharePoint site with existing Site Pages, PnP Template required to deliver Security changes only, leaving page content untouched i.e. "delta" template scenario.
- Xml Site Template containing a
<pnp:ClientSidePage>element referring to an existing page. AttributeOverwritenot specified as page content required to be retained (If Overwrite is set to True page content will be lost). - Add a
<pnp:Security>element within the above<pnp:ClientSidePage>but NO OTHER page elements - Run
Invoke-PnPSiteTemplateusing this template
What is the version of the Cmdlet module you are running?
1.6.0 and also 1.6.49-nightly
Which operating system/environment are you running PnP PowerShell on?
- [x] Windows 10
- [x] PowerShell Core 7.1.3
Workaround
None
PnP Trace Log
pwsh Warning: 0 : 2021-07-26 13:26:01.3782 [ClientSidePages] [12] [Information] Page with name ClientHome.aspx did already exist and the overwrite flag was not set, so nothing happened