Fix Access Denied When Applying SharePoint Site Template
Question details
The user needs to resolve an Access Denied error that occurs when attempting to apply a site template through the SharePoint Online solution gallery, despite having administrative rights.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Applying a site template from the solution gallery to a target SharePoint site.
- Observed behavior
- The system displays an Access Denied error and prevents the user from successfully applying the site template.
Ensure you have access to the SharePoint Admin Center and possess the necessary global or SharePoint administrator credentials before making structural changes to site permissions or features.
Verify Site Collection Administrator Permissions
Use this solution to ensure your account has the specific Site Collection Administrator rights required to apply templates, which is higher than standard site owner permissions.
Being a SharePoint Administrator at the tenant level or a standard site owner is often not enough to apply site templates from the solution gallery. You must be explicitly added as a Site Collection Administrator for the target site.
Navigate to your target SharePoint site, click the Settings (gear) icon in the top right corner, and select 'Site information' followed by 'View all site settings'.
Under the 'Users and Permissions' section, click on 'Site permissions'.
Click on 'Site Collection Administrators' in the ribbon or advanced permissions page.
Ensure your user account is listed in this field. If not, add your name or email, and click 'OK' to save the changes.

Enable Custom Scripting on the Target Site
Apply this fix if the site template includes custom scripts or web parts that are blocked by SharePoint's default security policies.
Disable SharePoint Server Publishing Infrastructure
Use this method if the applied template is incompatible with the Publishing Infrastructure feature enabled on the site.
Looking for a Lightweight Document Solution?
While you manage and deploy your SharePoint site templates, you may also need a robust and cost-effective office suite for your daily document management. WPS Office is a highly compatible, free alternative to Microsoft Office that meets all your productivity needs.
- 1. Download the Installer: Visit the official WPS website and download the free installer for your operating system.
- 2. Install WPS Office: Run the setup file and follow the on-screen instructions to install the suite.
- 3. Open and Edit Files: Launch WPS Office and instantly open your existing Word, Excel, or PowerPoint documents without compatibility issues.

Frequently Asked Questions
Why do I get Access Denied if I am already a SharePoint Administrator?
A SharePoint Administrator role applies globally to the tenant, but applying a site template via the solution gallery specifically requires you to be added as a 'Site Collection Administrator' on that individual site collection.
How long does it take for custom script settings to take effect?
If you enable custom scripting through the SharePoint Admin Center GUI, it can take up to 24 hours to fully propagate. Using the SharePoint Online Management Shell (PowerShell) to enable it usually applies the changes immediately.
Can standard site owners apply site templates?
Standard site owners may not have sufficient permissions to apply certain custom templates, particularly if the templates involve deploying items to the solution gallery or running custom scripts. Site Collection Administrator rights are generally required for these actions.




