
Dear @Anita Weiler,
Thank you for reaching out regarding the issue you're experiencing when uploading a template to a SharePoint content type. We acknowledge how disruptive this can be, especially since the process previously worked without issue.
Based on your description and recent platform developments, the error message “An unexpected error has occurred. This error is likely related to changes in SharePoint’s security model and content type management behavior. Below are our recommendations to help you resolve or work around the issue:
- Identify Site Settings
- Check if the site is a modern site (e.g., Office 365 Group-connected or Communication Site).
- Use PowerShell to verify the script setting:
- Get-SPOSite -Identity <SiteURL> -Detailed | Select DenyAddAndCustomizePages
- Temporarily Enable Custom Script
- If allowed by your organization, a SharePoint admin can run:
- Set-SPOSite -Identity <SiteURL> -DenyAddAndCustomizePages 0
- Note: This setting auto-reverts after 24 hours, so upload the template promptly.
- Use the Content Type Gallery (Preferred for Global Use)
- Navigate to: SharePoint Admin Center → Content Services → Content Type Gallery.
- Locate or create the content type.
- Choose:
- Upload a new document template (recommended).
- Or use an existing template (URL must point to the same site or hub).
- Save and publish/republish the content type to propagate changes.
- Use Library-Level Templates
- Direct Library Template: Upload a custom template via Library Settings > Advanced Settings (works if only one content type is used).
- Library Content Type Template: If multiple content types exist, go to Library Settings > Content Types > [Your Content Type] and upload or link a template stored in the same library.
- Verify Permissions
- Ensure you have Site Owner or Site Collection Admin rights.
- For centrally managed content types, you’ll need SharePoint Admin or Content Type Admin roles.
- Lack of permissions can also cause the generic error.
I hope this information is useful. If you have any questions, please don't hesitate to reach out to us. Thank you for your kindness and understanding.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment”.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.