by Dany

2021-01-29

By default, you cannot open MS Teams site using SharePoint designer because Custom Script is not allowed on OneDrive, on sites users create themselves, on Group Sites such as sites created by MS Teams and on the root site for your organization.

To allow custom script on MS Teams sites

To allow custom script on a site immediately, follow these steps:

  1. Download the latest SharePoint Online Management Shell.
  2. Connect to SharePoint Online as a global admin or SharePoint admin in Office 365. To learn how to see Getting started with SharePoint Online Management Shell.
  3. Run the following commands.
Connect-SPOService -Url https://<siteName>-admin.sharepoint.com/

Set-SPOsite <SiteURL> -DenyAddAndCustomizePages 0

Make sure when specifying the site URL, to remove the trailing slash, as including it (e.g.: https://<tenant>.sharepoint.com/sites/<siteURL>/), PowerShell will expect that (sites/<siteURL>/) to be a managed path when it is not. Leaving the slash off (e.g.: https://<tenant>.sharepoint.com/sites/<siteURL>), will works fine.

References

About the author 

Dany