TransWikia.com

How to disable "Connect to Teams" banner in SharePoint Online

SharePoint Asked by Namwar Rizvi on December 31, 2021

We have a set of Group connected Team sites in SharePoint Online and we don’t want to connect them to Microsoft Teams due to some specific business need.
The problem is that whenever an Owner of the site or site collection administrator login to one of those sites, SharePoint displays a banner on bottom left of the screen, asking the user to “Connect to Teams”.
Although the user can close the banner but the user can also click the link by mistake and the site will be converted to MS Team. Since it is a one-way process therefore, I want to make sure the user should not see the banner at all.
I have tried PnP and normal SharePoint Online PowerShell, UI, REST API but I am unable to find any way to disable this banner.
Can somebody guide me if there is a way to disable/hide this banner?
I have checked Microsoft site and it is a feature introduced last year https://www.microsoft.com/en-gb/microsoft-365/roadmap?filters=&searchterms=30685

2 Answers

This can be done via PowerShell:

$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'
    $site.Update()
    $site.Context.ExecuteQuery()
}

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

Answered by Trevor Seward on December 31, 2021

You need to use /_api/groupsitemanager/HideTeamifyPrompt method to disable the Teamify banner.

You can use it in PnP PowerShell as below:

Connect-PnPOnline -Url "https://tenant.sharepoint.com/sites/TestTeamSite"

$jsonBody = "{'siteUrl':'https://tenant.sharepoint.com/sites/TestTeamSite'}"

Invoke-PnPSPRestMethod -Method Post -Url "/_api/groupsitemanager/HideTeamifyPrompt" 
-Content $jsonBody -ContentType "application/json;odata=nometadata"

Reference - What's new in SPO REST API's

Ensure that you are using the latest PnP PowerShell module or atleast the one after May 2019 release ( v3.9 or higher)

Answered by Gautam Sheth on December 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP