Enable scripts in SharePoint

Copper Contributor

Hi,
I want to run custom scripts on my online SharePoint site, I have also allowed users from running custom script on personal sites in SharePoint Online, It's already been more then 24 hrs but I am not yet able to execute custom scripts on my online SharePoint site. 
Please suggest me some better options for the same. 
Thanks. 

3 Replies

Hi @AkashHolmetrics ,

I believe you've done everything is outlined here, perhaps, there might be just a missed tiny tick box somewhere.

Can you tell us, please, what is happening when you try to run scripts? Are there any logs available?

Hi @olegmelnikov 
Thanks for reply, Yes I have done as suggested in the link, but still I am getting this error while executing script page, Error 
" Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'  ............... 'unsafe-eval' . Either the 'unsafe-inline' keyword, a hash ('sha256-..........'), or a nonce ('nonce-...') is required to enable inline execution.

hi @AkashHolmetrics,

I am not a developer, but it looks like there is nothing to do with SharePoint, the script starts, but it fails because of the error.

Here, I found some clues about source values for *-src directives.

Here, I found pretty good guide 'How Content Security Policy works'.

Please, let me know, if it helps.