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

%3CLINGO-SUB%20id%3D%22lingo-sub-51826%22%20slang%3D%22en-US%22%3EAccess%20denied%20when%20applying%20template%20to%20team%20site%20(Group%20site)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-51826%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20export%20and%20import%20a%20team%20site%20(group%20site)%20from%20Office%20365%20but%20I%20have%20a%20few%20issues%20applying%20the%20template%3A%3C%2FP%3E%3CUL%3E%3CLI%3EI%20get%20an%20access%20denied%20on%20the%20Style%20Library%20when%20adding%20the%20site%20columns.%20I%20didn't%20add%20or%20change%20anything%20so%20I%20deleted%20it%20from%20the%20template%20xml%26nbsp%3Bso%20I%20could%20continue%20my%20testing.%3C%2FLI%3E%3CLI%3EI%20get%20an%20access%20denied%20while%20setting%20the%20navigation.%20The%20navigation%20type%20of%20the%20current%20navigation%20is%26nbsp%3BStructuralLocal.%20I%20tried%20debugging%20it%20and%20when%20setting%20the%20navigation%20type%2C%20it%20sets%20the%20propertybagvalue%20%22__NavigationShowSiblings%22%20to%20false%20which%20results%20in%20the%20access%20denied%20exception.%3C%2FLI%3E%3C%2FUL%3E%3CP%3EMy%20code%20and%20template%20can%20be%20found%20as%20an%20attachment.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20idea%20why%20I%20can't%20apply%20this%20template%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3CP%3EKind%20regards%3C%2FP%3E%3CP%3ESen%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-51826%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-51889%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20denied%20when%20applying%20template%20to%20team%20site%20(Group%20site)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-51889%22%20slang%3D%22en-US%22%3EIf%20I'm%20understanding%20correct%2C%20you%20are%20trying%20to%20apply%20the%20template%20to%20a%20Modern%20Team%20Site%20(created%20when%20you%20created%20the%20Office%20365%20Group).%20If%20this%20is%20the%20case%2C%20and%20the%20code%20is%20trying%20to%20update%20a%20Property%20Bag%2C%20then%20the%20error%20makes%20sense%2C%20as%20in%20Modern%20team%20sites%2C%20you%20cannot%20accessing%20or%20updating%20Propertybags%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Fpnp_articles%2Fmodern-experience-customizations-customize-sites%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Fpnp_articles%2Fmodern-experience-customizations-customize-sites%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAnyway%2C%20I%20suggest%20that%20you%20open%20an%20issue%20on%20the%20GitHub%20project%2C%20so%20the%20PnP%20team%20is%20aware%20of.%3CBR%20%2F%3EThanks.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-51829%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20denied%20when%20applying%20template%20to%20team%20site%20(Group%20site)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-51829%22%20slang%3D%22en-US%22%3EI%20had%20the%20same%20last%20week%20where%20a%20view%20on%20the%20style%20library%20was%20adjusted%20on%20the%20site%20where%20I%20exported%20from.%20Try%20to%20compare%20your%20template%20with%20a%20new%20site%20collection%20export.%3C%2FLINGO-BODY%3E
Highlighted
Regular Visitor

Hi,

 

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

Sen

2 Replies
Highlighted
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.
Highlighted
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
https://msdn.microsoft.com/en-us/pnp_articles/modern-experience-customizations-customize-sites

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