Forum Discussion
Getting the List of all sites/ sub-sites and their owners using PnP
Did you try using Search webpart or Search REST API
You can use search with either the Search Web Parts or using REST for search.
Search WebPart:
Find all Site Collections: “contentclass=STS_Site”
Find all Webs (top level sites and subsites): “contentclass=STS_Web”
http://techtrainingnotes.blogspot.com/2015/07/using-sharepoint-serach-to-find-sites.html
Search REST API:
http://yourserver/sites/yoursite/_api/search/query?querytext='contentclass=STS_Site'
http://yourserver/sites/yoursite/_api/search/query?querytext='contentclass=STS_Web'
https://msdn.microsoft.com/en-us/library/office/jj163876.aspx
You could also use Graph API to get these details
https://www.c-sharpcorner.com/article/retrieve-site-collections-and-subsites-using-microsoft-graph-api/
Owner for each site can be fetched using
https://graph.microsoft.com/beta/sites/{site-id}?$select=*,drive&$expand=drive
Thanks Naveen Karla ,
I haven't approached through Search or REST API or Graph API. I will give it a shot.
-Nabin