How to add Custom Scripts in SharePoint Online Communication site

Raj Saraiya 0 Reputation points
2024-06-17T10:51:27.39+00:00

Hey everyone,

I am confused with WIKI Page in communication site, kindly need some guidance here.
I have enabled allowed scripting for modern communication site, based on steps mentioned here
https://learn.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script#change-custom-script-settings
As it is mentioned here it will reset after 24 hours.
Q-1 Does it mean that after 24 hours, it will again set to blocked automatically?
Below in same blog it is mentioned that "This setting affects all sites. There are no options to preserve changes to custom script settings only on some specific sites. This parameter will be available until November 2024." under Note section, which seems confusing.
Q-2 Does it mean after Nov-24, we won't be able to allow custom script?
Q-3 In communication site, what other option is available in wiki page, for adding custom script?

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

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2024-06-18T02:04:58.15+00:00

    Hi @Raj Saraiya,

    If you enable custom script in SharePoint admin center. The setting will only last 24 hours. And you can keep the setting by running powershell cmdlet Set-SPOTenant -DelayDenyAddAndCustomizePagesEnforcement $True . The setting will not automatically switch back to Blocked. But the parameter will be available until November 2024. After that date, enable custom script setting will only last for 24 hours. You will need to change the setting every 24 hours

    Currently there is no other alternative function to the powershell cmdlet. We could wait for the official update.


    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.