Is there a way to block the use of SharePoint for multiple users on the weekend and allow them to enter only during the work week?
-
I believe the only way to restrict it is if you are using dirsync to synchronize your AD and then using something like ADFS to put logon restrictions in place. – Eric Alexander Mar 2 '16 at 16:37
-
I don't use dirsync :/ I understand that there is not any solution :/ – benoit rastier Mar 3 '16 at 10:13
-
you'd like to restrict them access only to SharePoint or to entire Office 365? – grisha Sep 16 '16 at 14:14
You can play with the User Policy at WebApplication level.
Write powershell script (for exemple) Who add 'All Authenticated users' for all zone of your webAppication with the Deny ALL Permissions for weekend And Remove this rule for working days
This is a bad solution, but only one that comes to my mind without ADFS.
You can remove their permissions by removing security group and then re-adding the group. SharePoint Online groups and users can be removed and added using Powershell, so you could automate it into a script running at certain hours. Please check:
Add-SPOUser
Adds an existing Office 365 user or an Office 365 security group to a SharePoint group.
Removes a user or a security group from a site collection or a group.
-
1if you remove SPuser from the site, the user will lost all custom permission (positioned at SPListItem for exemple). And will never recover their old right after re-add him – Nico Sep 16 '16 at 15:16
-
Agreed. That's why I started with 'it's a bad solution'. It sounded better than nothing, 'coz otherwise there is no way. But thanks for pointing this out. – grisha Sep 17 '16 at 11:05