Johann
Johann

Reputation: 13

Microsoft Graph getting Sharepoint main sites

Is it possible with Microsoft Graph to retrieve the main sites without retrieving the subsites? I am using the following URL to retrieve these sites:

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

The problem is it also retrieves the subsites. At the moment I bypass this problem by filtering out the items that do not have a root object {} returned: root object:
root object.

Upvotes: 1

Views: 132

Answers (1)

Amos
Amos

Reputation: 2091

You could try this endpoint :

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

Upvotes: 1

Related Questions