4

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

  • I tried this and works!, but, How do you add it again? – Johish Aug 19 '19 at 22:33
6

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)

| improve this answer | |
  • Thank you. I tried it and it worked smoothly. – Namwar Rizvi Aug 13 '19 at 14:11
3

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'
| improve this answer | |
  • I would not prefer this solution as it is achieving the same result but needs to disable DenyAddAndCustomizePages permission unnecessarily. Disabling this permission means, custom scripts will be allowed, which opens another can of worms. – Namwar Rizvi Aug 13 '19 at 14:14
  • 1
    That setting gets re-enabled after 24 hours on a site unless it has been first disabled tenant-wide. – Trevor Seward Aug 13 '19 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.