How to Find SharePoint Sites Associated with Microsoft Teams?

Requirement: Find the SharePoint Online site of the Microsoft Team.

How to Get the Associated SharePoint Online Site of a Microsoft Team?

Every Microsoft Teams created has a SharePoint Site associated behind the scenes to store files. To find the SharePoint site of the team,

  • Navigate to the Microsoft team, Click on the “Files” tab, and you’ll find a button “Open in SharePoint”find sharepoint online site of microsoft teams

This opens the SharePoint Online site of the particular Microsoft Teams.

Get a List of All Teams and their associated SharePoint Sites

To retrieve the associated SharePoint sites for Microsoft Teams, use this PowerShell script:

#Get Credentials to Connect
$Credential = Get-Credential

#Connect to Microsoft Teams
Connect-MicrosoftTeams -Credential $Credential | Out-Null
#Create a session and connect to Exchange
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri `
           -Credential $Credential -Authentication Basic -AllowRedirection
#Import the session
Import-PSSession $Session -DisableNameChecking -AllowClobber | Out-Null

#Get All Teams
$Teams = Get-Team | Select DisplayName, GroupId
Write-host "Total Number of Teams Found:"$Teams.Count

#Iterate through Each team and get SharePoint Site URL
ForEach ($Team in $Teams) 
    #Collect SharePoint Sites of the teams
    [PSCustomObject] @{
        TeamName      = $Team.DisplayName
        SharePointURL = Get-UnifiedGroup -Identity $Team.GroupId | Select -ExpandProperty SharePointSiteURL

This PowerShell gets the list of all Teams and their associated SharePoint Online sites: 

find sharepoint sites of microsoft teams

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

4 thoughts on “How to Find SharePoint Sites Associated with Microsoft Teams?

  • January 8, 2021 at 1:01 AM

    How do you connect when you need to use MFA?

  • January 8, 2021 at 12:59 AM

    you might be able to change it using steps –

  • January 6, 2021 at 2:24 PM

    WinRM basic auth is required to be enabled in order to connect to the PS session

  • December 3, 2020 at 7:48 PM

    got an error.

    New-PSSession : [] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. Basic authentication is
    currently disabled in the client configuration. Change the client configuration and try the request again. For more information, see the about_Remote_Troubleshooting Help topic.
    At C:ScriptsGet-MSteamsandAssociatedSites.ps1:11 char:12
    + $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Conne …


Leave a Reply