Fetch all sites from SharePoint by Microsoft Graph API - sharepoint

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?

Currently Graph API supported to get all SharePoint sites:
https://graph.microsoft.com/v1.0/sites?search=*
You can test in Graph Explorer firstly:
Reference:
Retrieve Site Collections And SubSites Using Microsoft Graph API

Related

How to get Sharepoint site members with Microsoft Graph API?

I am building an app which checks which member has access to which Sharepoint sites. How do I do that with the Microsoft Graph API?
For OneDrive I can get the user's drives by
graphServiceClient.Users[memberId].Drive.Root.Children.Request()
I would like to do that with Sharepoint sites like this
graphServiceClient.Users[memberId].Sites.Root.Children.Request()
but that is not possible. Any idea waht is the right API to get the all the Sharepoint sites the user have access to?

Microsoft Graph API - Share Sharepoint site only

You can share a Sharepoint site without adding them to the member groups via the front-end (screenshot included). However I was wondering if there was a way to do this via the Microsoft Graph API?
I have scoured the docs, both v1 and beta and haven't found anything - so any help would be greatly welcomed.
Graph API Docs
According to the Microsoft Graph user voice, this feature is currently unavailable in the Graph API and is currently a suggested feature - will update this answer if/when it is implemented
Uservoice Sharepoint permission suggestion

How to get SharePoint online Groups using Microsoft Graph API

I want to get sharepoint groups using graph api instead of REST API Call
As far as I know Microsoft Graph doesn't expose an endpoint that allows you to get the information of SharePoint Group.
If you has this requirement, you could vote this idea on Microsoft Graph UserVoice.

Search for Content Across SharePoint Sites

Currently I'm using: /v1.0/sites/{site-id}/drive/root/search(q='{search-text}') but I would like to search across all the sites I have access to.
Is there a Microsoft Graph API which can search a keyword on all sites a user can access in SharePoint without giving site id?
There's no Graph API for a global content search at the moment.
However you can leverage the SharePoint Search API.

Microsoft Graph API - Search content over a sharepoint site

We are creating a Sharepoint webpart that enable searching a Sharepoint site contents using Microsoft Graph Api. I am able to get the Lists and subsites
using graph Api, but not sure how to search any content at site level.
Looking for any pointers if this is even achievable.
Below are some of the API calls that work-
https://graph.microsoft.com/v1.0/sites/tenants/lists?select=id,name
https://graph.microsoft.com/v1.0/sites/tenants:/sites/sitename:/sites?search=subsitename
https://graph.microsoft.com/v1.0/sites/tenants:/sites/sitecollection:/lists
here is an example filtering on a list items
https://graph.microsoft.com/v1.0/sites/myThing.sharepoint.com,ffffffff-ffff-ffff-ffff-ffffffffffff,12345678-1234-1234-1234-123456789012/lists/25dd5a71-69a9-44f8-b60f-ed16718eae54/items?expand=fields(select%3DTitle,ID,ContentType,myLookupID)&top=1000&filter=fields/ContentType eq 'My Page'

Resources