0
votes

Does anyone know how I can fetch all sites from my SharePoint by using Microsoft Graph API?

I saw this documents but it seemed that there are no API to list sites.

And I saw this questions but answer was there were no ways. List Microsoft Sharepoint Sites with Microsoft Graph

Could you help me?

1
Could you please try GET graph.microsoft.com/v1.0/sites?search=* and see if it helps?Shiva Keshav Varma
Have you tried the suggestion in the answer ? Did it work for you ?Jerry
Yes, it works! Thanks!Katsuma Narisawa

1 Answers

0
votes

Currently Graph API supported to get all SharePoint sites:

https://graph.microsoft.com/v1.0/sites?search=*

You can test in Graph Explorer firstly:

enter image description here

Reference:

Retrieve Site Collections And SubSites Using Microsoft Graph API