Access denied when applying template to team site (Group site)

Copper Contributor



I'm trying to export and import a team site (group site) from Office 365 but I have a few issues applying the template:

  • I get an access denied on the Style Library when adding the site columns. I didn't add or change anything so I deleted it from the template xml so I could continue my testing.
  • I get an access denied while setting the navigation. The navigation type of the current navigation is StructuralLocal. I tried debugging it and when setting the navigation type, it sets the propertybagvalue "__NavigationShowSiblings" to false which results in the access denied exception.

My code and template can be found as an attachment.


Any idea why I can't apply this template?


Thanks in advance.

Kind regards


2 Replies
I had the same last week where a view on the style library was adjusted on the site where I exported from. Try to compare your template with a new site collection export.
If I'm understanding correct, you are trying to apply the template to a Modern Team Site (created when you created the Office 365 Group). If this is the case, and the code is trying to update a Property Bag, then the error makes sense, as in Modern team sites, you cannot accessing or updating Propertybags

Anyway, I suggest that you open an issue on the GitHub project, so the PnP team is aware of.