Forum Discussion
RamBhajan
Jun 04, 2023Copper Contributor
May site collection admin enable the custom script in SharePoint online site
Hello, I saw in multiple posts that if one wants to enable custom script in SP online site collection then one needs to have SharePoint admin or global admin permissions. But, my question is ...
SvenSieverding
Jun 04, 2023Bronze Contributor
Hi RamBhajan,
i am afraid that will not be possible.
See here: https://learn.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script
"As a Global Administrator or SharePoint Administrator in Microsoft 365, you can allow custom script as a way of letting users change..."
Disabling this feature requires admin access as the intent of disabling custom scripts are security reasons. Every custom script on a page will be executed as the current logged in user and might access more information than what is stored in the current site collection. So if a site collection admin could disable that feature then the scripts could do damage in other site collections. (Where another SCA is responsible and might not want that.)
So a SharePoint Admin needs to trust a SCA and then disable that feature for that site.
If an SCA could do that himself then this feature would be useless.
Best Regards,
Sven
RamBhajan
Jun 06, 2023Copper Contributor
Thank you SvenSieverding. This is what I wanted to confirm.