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.

1
  • you have Sites.Read.All and Sites.ReadWrite within the roles claim in the access token? Commented Apr 3, 2023 at 7:51

1 Answer 1

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=*
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.