Disallow Classic Team Sites to Join Office 365 Groups
-
08-02-2021 - |
Frage
We have an automated process that provisions Classic Team Sites in SharePoint Online for the purposes of migration of the legacy sites. We have noticed that these classic team sites can be joined to Office 365 groups. We have a requirement to disable this feature for the classic team sites.
Is there a way to prohibit classic team sites from joining Office 365 groups?
Lösung
To actually disable this, go to the classic settings page:
https://contoso-admin.sharepoint.com/_layouts/15/online/TenantSettings.aspx
About in the middle you will find this one:
Control whether site collection administrators can use the "Connect to a new Office 365 Group" command on the Settings menu to connect classic team sites to new Office 365 groups
This setting has two options:
- Prevent site collection administrators from connecting sites to new Office 365 groups
- Allow site collection administrators to connect sites to new Office 365 groups
Standard is second, for your requirement - set it to the first one.
Andere Tipps
There is a hidden GroupifyMenuButton feature that is responsible for hiding and showing the "Connect to new Office 365 Group" button.
This action button redirects to the following URL when we click it: /_layouts/15/creategroup.aspx?mode=connectgroup URL
We can disable this feature with the following Powershell PnP code:
Connect-PnPOnline -url "https://contoso.sharepoint.com/sites/ClassicTeamSite"
$GroupifyFeature = "5007df5b-1eea-49f8-9c02-5debc81ce3f2"
Disable-PnPFeature -Identity $GroupifyFeature
Result
If we want to add the button back to the site settings, we can activate the feature again:
Enable-PnPFeature $GroupifyFeature