Disable Teams Creation Prompt in SharePoint Online

Have you seen this lately? It appears to any Office 365 Group owner where a Team has not been associated with a SharePoint Online site.


There’s a simple method to disable it. Using the SharePoint Online PnP cmdlets, run the following cmdlet.

$tenant = "https://tenant-admin.sharepoint.com"
$web = "https://tenant.sharepoint.com/sites/ModernTeam"

Connect-PnPOnline -Url $tenant -SPOManagementShell
$site = Get-PnPTenantSite -Detailed -Url $web
if ($site.DenyAddAndCustomizePages -ne 'Disabled') {
    $site.DenyAddAndCustomizePages = 'Disabled'

Set-PnPPropertyBagValue -Key 'TeamifyHidden' -Value 'True'

The first portion of the above script verifies that DenyAndAddCustomizePages is disabled on the site. This enables us to set a property bag value of TeamifyHidden to true. If you refresh the homepage after setting the value, the dialog box to create Teams should no longer appear.

At the time of writing, there is no method to disable this tenant-wide. It must be disabled on a Site Collection by Site Collection basis.

Trevor Seward is a Microsoft Office Apps and Services MVP who specializes in SharePoint Server administration, hybrid scenarios, and SharePoint Online. He has been working with SharePoint for 16 years from SharePoint 2003 on up, managing environments with terabytes of content for 150,000+ user organizations. Trevor is an author of Deploying SharePoint 2016 and Deploying SharePoint 2019. You can find him on Twitter and in /r/sharepoint.