Temporary site unavailable setting in SPO except administrator
Frage
I use ModernUI in SharePoint Online.
Is it possible to temporarily disable the system for release work, site updates, etc., except for operational administrators?
I also want to prevent users who have registered their browser's favorite sites from directly accessing the URL.
It would be great if I can display message like "Site is under maintenance".
Appreciate any ideas\Pointers. Thanks,
Lösung
To answer your questions:
It is not possible to disable the system for getting release from Office 365, it is only supported to control what release we may receive. You will have to contact Microsoft for further control on your behalf.
You can set a site to Read Only using PowerShell:
Set-SPOSite -Identity <siteURL> -LockState ReadOnly
It will display a message on top of the site that it is under maintenance and read-only, but it will disable the activities on all users who have access, including Administrators. Also it doesn’t apply to the root site collection.
As a workaround, I would suggest you restrict user access by adjusting user permissions directly.
We cannot prevent users from accessing a site via the URL (or following the site) as long as they have access to it. See a related post here: How can you prevent users following your site?