Forum Discussion

ksaurabh02's avatar
ksaurabh02
Copper Contributor
May 24, 2023

Filter out Teams sharepoint sites

Hi everyone,

I'm currently working on a project where I need to filter out Teams SharePoint channel sites when making a request to retrieve all sites using the GET /sites endpoint.

I have noticed that there doesn't seem to be a specific parameter in the properties that can be used to identify Teams sites. For example, when working with OneDrive, the URL contains "-my.xxx.com" as an identifier. Is there any way to filter out Teams sites?

One possible approach I have considered is listing all the channel names in Teams and then filtering out the sites that match those names. I have observed that the SharePoint web client can perform this kind of filtering. Is this functionality only available internally and not accessible through the Graph API? When I access a Teams SharePoint site, it displays the Teams logo, and these sites are not visible under "All Sites" in the SharePoint client.

 

Resources