I cannot use Microsoft Graph (else it would be easy) because I cannot get the Graph Token (I use the SharePointOnlineCredentials with username/password).
So all I can use is CSOM and the REST API.
Right now I get the frequent sites using this REST API:
It returns the recent sharepoint sites including those belonging to Teams. I need to know if a given site belongs to Teams or not.
I have read that using the WebTemplate value would be enough (if it is Group) but I discovered that I can manually create a SP site and it can hold this value.
Is there a reliable way to know if a given site is used in Teams?