1

Is there a way to get a list of all personal sites using SharePoint API's?

I referred to this answer to get all the personal sites and used:

https://abc.sharepoint.com/_api/search/query?querytext='contentclass:STS_Site Path:"https://abc-my.sharepoint.com/personal/*"'

But this does not give the personal sites.

0

The personal site collection have path "https://tenant-my.sharepoint.com/".

You can use below REST API query to get a list of all personal sites.

https://<site_name>.sharepoint.com/_api/search/query?querytext='contentclass:STS_Site Path:"https://<site_name>-my.sharepoint.com"'

For ex- "personalsite-my.sharepoint.com" is my site collection.In order to get list of all personal sites you can use query -

http://personalsite.sharepoint.com/_api/search/query?querytext='Path:"https://personalsite-my.sharepoint.com contentclass:STS_Site"'

You may be comfortable writing REST API calls to achieve this. Alternatively, I would highly recommend using the SharePoint 2013 Search tool to help out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.