Forum Discussion

michaelsjodin's avatar
michaelsjodin
Brass Contributor
Jan 13, 2021
Solved

How did someone activate Team for SharePoint online ?

Hello

 

I have a few SharePoint online pages where i do not want teams to be activated. I have with the script bellow tried to remove the ability for owners and administrators as best as i can to be able to activate teams but even so someone still managed to activate teams for one SharePoint site and i would like to know if anyone can describe how he could have managed to do it(he do not know himself) even with Teamify set to hidden so i can inform everyone what not to do / click on.

 

#Variables

$SiteURL = "https://contoso.sharepoint.com/sites/Contoso"

 

#Connect to PnP Online

Connect-PnPOnline -URL $SiteURL -UseWebLogin

 

#Update the Property bag key to remove Teams Prompt

Set-PnPPropertyBagValue -Key "TeamifyHidden" -Value "True"

  • You cannot avoid with the script that users can create the Team in the Teams client by using the option "Create from an existing Group"
  • boneyfrancis's avatar
    boneyfrancis
    Iron Contributor
    Presuming you had disabled DenyAddAndCustomizePages before toggling TeamifyHidden to True, is it possible that the user created a Teams which then automatically created a SharePoint site (and not the other way around)?
    • michaelsjodin's avatar
      michaelsjodin
      Brass Contributor
      No. the SharePoint site had existed for several months and we had Teamify disabled on it since creation. One day it just popped up in the desktop client, that's how we noticed that it had been activated by the user in question.
      • jcgonzalezmartin's avatar
        jcgonzalezmartin
        MVP
        You cannot avoid with the script that users can create the Team in the Teams client by using the option "Create from an existing Group"

Resources