RobD365
Aug 29, 2022Brass Contributor
Setting permissions via PnPSiteTemplate
Hi All,
I'm trying to create a site template for use on sub-webs via Get-PnPSiteTemplate / Invoke-PnPSiteTemplate which will configure create site-specific groups, and set permissions on one of the libraries it creates.
Looking at the XML generated from Get-PnPSiteTemplate, I can see
<pnp:Security AssociatedOwnerGroup="{groupsitetitle} Owners" AssociatedMemberGroup="{groupsitetitle} Members" AssociatedVisitorGroup="{groupsitetitle} Visitors">, nested in there are pnp:SiteGroup line items for the site collection level groups, and {groupsitename} Owners/Members/Visitors as well as a {groupsitename} Custom group.
When I Invoke-PnPSiteTemplate, the libraries and home page are generated correctly, however the groups are missing - the only permissions are those inherited from the site collection.
Any help would be appreciated.
Cheers
Rob