Instead of Graph API, you could use REST API to search sites in the SharePoint online.
First, grant users with add-in only / app-only permissions in the SharePoint online. Then use search REST API to search sites.
Use following endpoint to retrieve a list of sites: https://{your-tenant-name}.sharepoint.com/_api/search/query?querytext='contentclass:STS_Site'&selectproperties='Title,Path'&startrow=0&rowlimit=500
.
This endpoint will return a list of up to 500 SharePoint sites, including the site title and URL. If you need to retrieve more than 500 sites, you can use the startrow parameter to retrieve the next set of sites. For example, to retrieve sites 501-1000, set startrow to 500 and rowlimit to 500.
References:
How to grant add-in only / app-only permissions in the SharePoint Online
Other ways to search sites in the SharePoint online.
1.Use UI to search.
https://learn.microsoft.com/en-us/sharepoint/get-started-with-modern-search-experience
2.Use PowerShell to search.
3.Use Graph API with Delegation permission to search.
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.