allowing custom scripts in Sharepoint

David Bair 0 Reputation points
2024-08-16T15:05:14.2233333+00:00

I have been creating custom HTML code which I convert to .aspx files and upload to Sharepoint, then using the embed web part to embed them in Sharepoint pages. I embed the Sharepoint URL in an iframe. Recently, when I look at the page, I am prompted to download the file. I read the instructions on how to enable custom scripts in Sharepoint, but I am unclear whether this applies to my situation since I don't know of any changes in my institution's Sharepoint administration. I would like to know why this issue is occurring now, and, given that nothing has changed on our end, whether I still need to be concerned about the instructions from July 10 - https://learn.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script. Thank you

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2024-08-19T02:39:54.0766667+00:00

    Hi @David Bair,

    By default, any changes to custom script settings for a specific site only last for a maximum of 24 hours. This new set of capabilities enabled by end of June 2024.

    If you run the cmdlet Set-SPOTenant -DelayDenyAddAndCustomizePagesEnforcement $True, you could temporarily circumvent the 24-hour reset setting . This parameter will be available until November 2024. After that date, it will no longer be possible to prevent SharePoint in resetting custom script settings to its original value for all sites.


    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.

    1 person found this answer helpful.

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.