How to get SharePoint modern page content using Graph API? - sharepoint

I can get SharePoint modern Page content through SharePoint REST API using below endpoint but I'm looking for GRAPH API endpoint to achieve the same result.
/_api/web/lists/getbytitle('Site%20Pages')/items?$select=CanvasContent1
Can someone assist on this ?

Found the solution through Microsoft docs Q&A
page content can be found via
https://graph.microsoft.com/beta/sites/{site-id}/pages/{page-id}/webparts
Note: It's available only in /beta version

Related

Microsoft Graph API for confluence site search

I am working on a requirement where I need to use Microsoft Graph API for confluence site search. I know graph API can be used for share point search. But is there any way we can do confluence site search??
It depends on the Confluence type you use:
For the Server version, you can create custom add-n that uses Java API https://docs.atlassian.com/ConfluenceServer/javadoc/7.17.0/ or you can use REST API https://developer.atlassian.com/server/confluence/confluence-server-rest-api/ to i9ntegrate Microsopht Grap API and this API.
For Cloud Confluence version you can just use REST API https://developer.atlassian.com/cloud/confluence/rest/intro/ directly or use Forge or Spring Boot/JS based add-oons and REST API

MS Graph API: How to find out what's a site's template?

How to find out what's a site's template, using the Graph API? There's an easy way to do this using the REST API, but I couldn't anything in the Graph API which does that.
Basically, I'm looking for the Graph API's equivalent for Web.WebTemplate.
According to the API documentation, there seem no such endpoint that could expose the web template.
Ref: https://learn.microsoft.com/en-us/graph/api/resources/site?view=graph-rest-beta
BR
A workaround to get the site's Root Web Template is to use the reports endpoint.
https://learn.microsoft.com/en-us/graph/api/reportroot-getsharepointsiteusagedetail?view=graph-rest-1.0
There is no easier alternative as far as I know, but in this list you can map site ids and know their templates.

Fetch all sites from SharePoint by Microsoft Graph API

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

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

Need help on searching a document form Sitepage in Sharepoint using Microsoft Graph

I am working on SharePoint Integration where i am able to success using Microsoft Graph Explorer for a Site search using Drive id.
Here is how i am able search for a Single Site:
https://graph.microsoft.com/v1.0/drives/b!I9A-JY94D0CQp-2TBvsUupBLMUF2SrJHp5VylC7DY8DpCdF-7uQ6NTp6t-MRD8/root/search(q='sharepoint')
With this i am able to get the details of the record 'Sharepoint'.
Now i am trying to search in SitePage where we have Documents added. Can anyone please help me the api to be used in Graph Explorer to get the correct result
I am able to SitePage id using
https://graph.microsoft.com/beta/sites/root/pages?$filter=name eq 'DevHome.aspx'
Your Approach is incorrect.
If you have to search the content of the document library added to a Site page, you need to query the doc library not the Site page.
Using Graph API you will not be able to search the content in the site page.

Resources