How to Fix SharePoint List Template Upload Access Errors
Question details
Users are unable to upload list templates in SharePoint Online due to access denied or approval required error messages.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Attempting to upload a customized list template to a Microsoft 365 group-connected SharePoint site.
- Observed behavior
- The list template upload fails with an access or approval error, frequently caused by disabled custom scripts or outdated SharePoint Online PowerShell modules preventing administrative configuration.
Verify that your account has SharePoint Administrator or Global Administrator permissions within the Microsoft 365 admin center before attempting to run configuration scripts.
Update PowerShell Module and Enable Custom Scripts
Updating your SharePoint Online PowerShell module and executing the command to allow custom scripts resolves the most common template upload access restrictions.
By default, SharePoint Online disables custom scripts on modern, group-connected sites for security reasons. Uploading an STP list template requires these scripts to be temporarily enabled via PowerShell.
Open Windows PowerShell as an Administrator. Run the command 'Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version' to check if your module is outdated.
If the module is outdated, run 'Update-Module -Name Microsoft.Online.SharePoint.PowerShell' and accept the prompts to install the newest version.
Run 'Connect-SPOService -Url https://[yourtenant]-admin.sharepoint.com' and log in with your SharePoint Administrator credentials.
Execute 'Set-SPOSite -Identity https://[yourtenant].sharepoint.com/sites/[yoursite] -DenyAddAndCustomizePages 0' to enable custom scripts, which will grant access to upload the list template.

Looking for a Lightweight Alternative to Microsoft Office?
While resolving Microsoft 365 and SharePoint access issues, consider streamlining your daily document workflow with WPS Office. It provides a robust, easy-to-use suite for creating, editing, and sharing documents without complex administrative setups.

Frequently Asked Questions
Why does SharePoint require custom scripts to be enabled for list templates?
Legacy list templates (STP files) contain custom XML configurations. Modern SharePoint group-connected sites block custom scripts by default to enhance security, which consequently blocks the upload and application of these customized template files.
What should I do if the Update-Module command returns an error?
Ensure you are running PowerShell with administrative privileges. If it still fails, you might have conflicting versions. Run 'Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell -AllVersions' first, followed by 'Install-Module -Name Microsoft.Online.SharePoint.PowerShell'.
How can I verify if I have SharePoint administrator permissions?
Log into the Microsoft 365 admin center, navigate to 'Users' > 'Active users', select your user profile, and check the 'Roles' section. You must have either the 'SharePoint administrator' or 'Global administrator' role assigned.
Are there alternative ways to duplicate a list without uploading an STP template?
Yes. In modern SharePoint, you can navigate to 'Site contents', select 'New' > 'List', and choose the 'From existing list' option. This allows you to duplicate a list's structure without needing to mess with PowerShell or custom script permissions.




