SharePoint Online restricting Everyone and All users Sharing on people picker


I been asked to restring Sharing for the below from tenant level as there was a business reason to restrict users accidentally sharing site to all users or everyone, the below is the script i ran

Open SharePoint Online Management Shell

Run the below command to get it connected -

# OPEN SHAREPOINT ONLINE ADMIN PORTAL WITH CREDETIALS

Connect-SPOService -Url https://xxx-admin.sharepoint.com   -Credential yourid.domain@site.co.uk

Once connected run the below code, appropriate for your need

Hide “All Users” form the Sharing window or People picker for entire SharePoint Online
        Set-SPOTenant -ShowAllUsersClaim $false


Hide  “Everyone” form the Sharing window or People picker for entire SharePoint Online
        Set-SPOTenant -ShowEveryoneClaim $false

Hide “Everyone Except External Users” in people picker (while sharing) for entire SharePoint Online
        Set-SPOTenant -ShowEveryoneExceptExternalUsersClaim $false

Hope this helps...

Comments

Popular posts from this blog

Total Count of Items in a List in Sharepoint

How to filter SharePoint List based on user permission

SharePoint Scrolling Announcement/ News Scroll for 2010/2013