I am looking for a Graph API call which can return to me all of the sites in Sharepoint Online.
Looking at Enumerating Sites: https://docs.microsoft.com/en-us/graph/api/site-list?view=graph-rest-beta&tabs=http
GET https://graph.microsoft.com/beta/sites?filter=siteCollection/root ne null
it doesn't seem to return group-based sites or sub sites.
Looking at Site Search: https://docs.microsoft.com/en-us/graph/api/site-search?view=graph-rest-beta&tabs=http
GET https://graph.microsoft.com/beta/sites?search={query}
this might be more promising but there is no explanation for how "query" should be structured or what it searches against.
My thought was that since all of the site ids begin with the tenant domain that I might be able to search on that and then retrieve every site and subsite for the tenant. But I'm not sure how to perform that query.
Ideally something like:
GET https://graph.microsoft.com/beta/sites?search=id like contoso.microsoft.com