So, I understand you want to show such a message in SharePoint Online. One way could be go custom and implement a SPFx based solution. But if you just want users to not to add any content in such SPO sites, you can make them read only. Take a look at this article about HOW TO MAKE SHAREPOINT ONLINE SITE COLLECTION READ ONLY
Sharepoint online add a notication message at top banner in the site
I want to display a alert message to users at the top of the site before site migration in SP online. In SP 2016 i have implemented using powershell usercustom actions that is working fine and i did the same in online, but here it is not working. Below attached the working version of SP 2016 image. Please suggest any solutions or approach.
3 answers
Sort by: Most helpful
-
-
Baker Kong-MSFT 3,801 Reputation points
2020-08-07T05:30:38.363+00:00 Hi Hemanthkumar-8346,
Modern experience does not support custom actions. This is a limitation (or as designed) by the modern experience. You can continue using script link action in classical UI.
Per the doc suggestion, the recommendation is to use SPFx extension. We can inject some JS/CSS script into SPFx extension.
Below is my test demo:
And the related JS is:
This js file was stored under /Style Library.
Test Result:
Best Regards,
Baker Kong -
Baker Kong-MSFT 3,801 Reputation points
2020-08-11T04:35:10.103+00:00 Hi @Hemanth kumar ,
Regarding this issue, we have not heard from you for some time. Does it get resolved? If the above info is helpful to this question, it would be appreciated if you can mark it as an answer so that others who stuck in similar issues could get answered quickly.
Thanks
Baker Kong