1. Help Center
  2. Cloud
  3. Data Source Management

Retrieving a Teams Team or Channel URL(s) for a Data Source

Obtaining a Teams Team or Channel URL

When creating a new Data Source for a Teams Team or Channel, the path that is required is the Teams URL. This is obtained via the Teams application (client application or browser-based application).

Retrieve a Teams Team URL:

mceclip0 (24)

1. Open the Teams app and select the Teams icon on the left menu.

2. Click the menu (3 dots) next to the name of the Team for which you wish to retrieve the URL.

3. Select the Get link to team option from the drop-down menu.

4. A popup will now be displayed; Click the Copy button to copy the Team URL to your clipboard.

mceclip3 (8)

Example Teams Team URL format:

https://teams.microsoft.com/l/team/19%3a3443a76035432d75298902951103e2d%40thread.tacv2/conversations?groupId=b71117ea-22dc-3fe5-91d8-a3ccdfcb2d7b4&tenantId=3629840d-bf48-494b-9c34-87a0c7012c32

Retrieve a Teams Channel URL

A similar process can be used to obtain a Teams Channel URL by selecting the "Get Link To Channel" option from the channel menu.

mceclip0 (25)

1. Open the Teams app and select the Teams icon on the left menu.

2. Expand the Team (click the small arrow) to reveal the channel list.

3. Click the menu (3 dots) next to the name of the Team Channel for which you wish to retrieve the URL.

4. Select the Get link to channel option from the drop-down menu.

5. A popup will now be displayed; Click the Copy button to copy the Team URL to your clipboard.

mceclip2 (10)

Example Teams Channel URL:

https://teams.microsoft.com/l/channel/19%3a2e50a73363854d34422a302943603c1e%40thread.tacv2/General?groupId=b26227ea-60dc-4fe5-91d8-a3aafddb1b7b7&tenantId=3625126c-da55-593b-9c68-97f0a7360c14

Locations below the channel level are unsupported as a start location for a Data Source.

 

Obtaining a List of Teams Team URLs

There is currently no way of obtaining a list of Teams team URLs from the admin center; however, the PowerShell script below will generate the URLs.

This requires the Microsoft Teams PowerShell Module, installed via the following command:

 Install-Module -Name MicrosoftTeams 

Powershell script: This script could take a while to run, depending on the organization's size.

# the desired host name - change this if required
$desiredHostName = "teams.microsoft.com"

# connect to MS Teams
$conInfo = Connect-MicrosoftTeams

# get collection of all teams
$allTeams = Get-Team

# foreach over all teams, generating the
$Output = foreach ($foundTeam in $allTeams) {
New-Object -TypeName PSObject -Property @{
FriendlyName = $foundTeam.DisplayName
Path = "https://" + $desiredHostName + "/l/team/" + [uri]::EscapeDataString($foundTeam.InternalId) + "/conversations?groupId=" + $foundTeam.GroupId + "&tenantId=" + $conInfo.TenantId
} | Select-Object FriendlyName,Path
}

# output to csv
$Output | Export-CSV TeamsWebUrls.csv -notypeinformation

IMPORTANTCloud Storage Files in Teams Will Not be Discovered

If you are using cloud storage on the Files tab (so they appear as folders in Teams), these folders are third-party locations that are not exposed via the Graph API and, therefore, will not be discovered by the Teams Collector.

Multiple Subscriptions

The nature of the URL retrieved from Teams does not provide any differentiation with regards to subscriptions being used; all the URLs come with the host teams.microsoft.com permission. Therefore, if you have multiple M365 subscriptions you wish to discover, then you will need to modify the copied URL to replace teams.microsoft.com with something unique - a subscription name is an option; however, it is entirely up to you.

NOTE: If using the PowerShell above, the first variable $desiredHostName permission defines this value.

Throttling

Microsoft does not advertise the throttling limits for many of its platforms; however, they are variable so they can be responsive to current conditions. The Collector will adhere to any throttling response received from the Graph API and prevent any further calls until the specified time has elapsed.

Due to this, it can appear that the Data Source screen is no longer updating processed containers/objects. Unfortunately, Microsoft does not advertise what the maximum wait time will be; however, the maximum we have so far seen in testing is five minutes.