Sharepoint Team Group site - can not add script, lacking role? How can i fix this?

Iron Contributor

Hi

 

Im struggling to create a webpage for my Team Sharepoint Group Site.

 

I can not use the Modern UI pages since they dont allow me to insert any scripts.

So i have created a wiki page where i can add a script.

But when i add a script im faced with a error message that i do not have the correct roles.

But i have tried with an global admin account and it does not work.

 

The error message is in swedish, but roughly transleted it says

HTML-code can not be attatched becaouse you can not add a webpart that uses scripts on this webpage. Contact an administrator if you think you should have access to do this.

 

(HTML-koden kan inte infogas eftersom du inte kan lägga till webbdelar som kan användas i skript på den här webbplatsen. Kontakta administratören om du anser att du bör ha behörighet att göra detta.)

 

I have asked our support and they say they can not find any more access to give me to allow me to add scripts. Can anyone help me find what i need?

 

Note: I am doing this on a Microsoft Teams Group Sharepoint site. Created a wiki-page and trying to add a script. See screenshots:

http://prntscr.com/jdnktw

http://prntscr.com/jdnlcf

 

 

Hope someone can help or at least point me in the right direction!

 

 

 

3 Replies

You can add scripts to modern pages.  You will need to deploy the Modern Script Editor web part that can be found in the SPFX web part examples.  It takes some configuring and deployment, but there are detailed instructions here: 

https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor

 

I works just like the Script Editor for classic.  I highly recommend deploying this one.

 

Looks wonderful but im lost in how i should get this on my sites.

Dont even know where to start.....

 

 

There are instructions on the link in my response.  It is a bit technical, so you may need to enlist some help from your IT dept if you can't understand what to do.