You should do some API calls to infer that.
First, you should get all teams in your organization. Do to that you should call:
GET /groups?$select=id,resourceProvisioningOptions
Or:
GET /groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')
You can read more about it at List all teams in Microsoft Teams for an organization. The response will be of the form:
HTTP/1.1 200 OK
Content-type: application/json
Content-length: xxx
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups",
"value": [
{
"id": "00e897b1-70ba-4cb9-9126-fd5f95c4bb78",
"resourceProvisioningOptions": []
},
{
"id": "00f6e045-f884-4359-a617-d459ee626862",
"resourceProvisioningOptions": [
"Team"
]
}
]
}
Then, for each id
in the response above, you should call to list channels:
GET /teams/{id}/channels
You can read more about this API at List Chanels. The response will have an entry in its json called webUrl
. The value of that key, will be the channel URL you are looking for.