0

We are getting empty results even though we are having sites in the sharepoint account.

API - https://graph.microsoft.com/sites

MS Documentation

Method - GET

We have Sites.Read.All and Sites.ReadWrite permission in graph access token.

Could you please help us to solve this issue.

James Z
  • 12,209
  • 10
  • 24
  • 44
karthik
  • 191
  • 3

1 Answers1

0

According this and this, calling https://graph.microsoft.com/v1.0/sites is supported with only application permissions only. With delegated permissions you can filter only root site https://graph.microsoft.com/v1.0/sites?$filter=siteCollection/root ne null

I would prefer using search to get all sites

GET https://graph.microsoft.com/v1.0/sites?search=*
user2250152
  • 14,658
  • 4
  • 33
  • 57