I have created a very basic SP site in SP Online. I am using modern pages. Basically I have some promoted links (using third party app) that users can click and open up different apps, links, etc.

I only want two groups:

a) Admins who can edit the links and graphics and change the site b) Everyone else, who can ONLY click on the links. Don't want them to add/change/delete pages or links or anything.

Looking at the picture below I want the parts marked with a red line to be hidden to everyone in the site EXCEPT the admins.

How in the world do I do this? Should be simple.

Please someone I have been working on and off in SP for a year and STILL cannot find a way to do this very simple thing.

enter image description here

1 Answer 1


You need to add custom script to hide the sections. Inspect all sections and get the class. Hide them using jQuery based on condition. You can do it using 2 ways:

  1. Develop an extension which will hide the marked section if user do not have full control permission. This is best practice approach. Use below link to getting started with extension https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/build-a-hello-world-extension

  2. Add script editor to your page. Inject your script inside it. This is easy solution but not best practice. You can find the package on below link: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor

  • Thank you for the response. I do find it utterly amazing that you basically have to a) write an extension to be able to do something that should come out of the box or b) write some react code? How can this be possible. There is NO default way to accomplish this? Apr 2, 2019 at 15:45
  • Microsoft do not want to developers to inject any kind of jQuery directly in modern UI. Here is the security issues with Microsoft has stated: docs.microsoft.com/en-us/sharepoint/… Apr 3, 2019 at 2:10
  • That's why they have introduced SPFx. It is mentioned in alternative way in above link. Apr 3, 2019 at 2:12
  • Though script editor webpart is still available, but admin can just remove the app if any malicious jQuery is written. But still I will suggest you to go with react extension code. That way only you or someone who has access to code can make changes and that will be more secure Apr 3, 2019 at 2:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.