Error when uploading a template to a SharePoint content type

Anita Weiler 0 Reputation points
2025-07-30T20:26:54.9633333+00:00

When I try to upload a template to a custom content type in SharePoint, I get the error "An unexpected error has occurred. Please try again later."

I've tried again later, keep getting the same error. In the past I was able to successfully uploat templates to content types. What has changed?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Ben-V 865 Reputation points Microsoft External Staff Moderator
    2025-07-30T22:12:02.0566667+00:00

    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:

    1. 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
    1. 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.
    1. 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.
    1. 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.
    1. 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”.  

    User's image

    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.

    0 comments No comments

  2. Ben-V 865 Reputation points Microsoft External Staff Moderator
    2025-08-01T16:53:05.25+00:00

    Have a great day, @Anita Weiler! I hope you're doing well.

    I'm contacted to follow up on the issue you reported earlier about issues with SharePoint. It's been a while since we've heard from you, and I'd like to check if the issue has been resolved or if you're still having difficulties.

    Please let us know as soon as possible so that we can provide further assistance if needed. Thank you for your time and cooperation.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment”.  

    User's image

    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.

    0 comments No comments

  3. Ben-V 865 Reputation points Microsoft External Staff Moderator
    2025-08-05T16:21:56.52+00:00

    Have a nice day, @Anita Weiler!

    I hope this message finds you well. 

    This is my second follow-up to check whether your issue has been resolved. I truly want to ensure your experience is as smooth as possible. If your problem is still ongoing or if you have faced any new difficulties, please share more details about the current steps you are stuck on. I am here and happy to provide further help whenever you need it. 

    While waiting for your response, I will continue tracking other customer questions on the forum to ensure everyone receives timely support. If you have additional questions, please feel free to tag my name in your reply so I can assist you promptly and more personally. 

    Looking forward to hearing from you soon.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment”.  

    User's image

    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.

    0 comments No comments

  4. Nitin Nischal 0 Reputation points
    2025-08-12T01:27:20.73+00:00

    I encountered the same issue, and your instructions were spot on. Thank you for the detailed guidance — it resolved my problem.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.