SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 993 forks source link

What is the best way to get content form sharepoint pages microsoft graph new pages api or pnp powerhsell #9781

Open harshdamaniahd opened 1 month ago

harshdamaniahd commented 1 month ago

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

πŸ’₯ SharePoint Framework

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

Additional environment details

Issue description

Should i use the new microsoft graph api to get content from sharepoint pages or Should I use pnp powershell for that Microsoft Graph Api : https://learn.microsoft.com/en-us/graph/api/sitepage-get?view=graph-rest-1.0&tabs=http

PnP PowerShell : Working with modern client-side pages using PnP PowerShell | Microsoft Learn

I would also like to see if we ChangeLog Api in microsoft graph. So that I can only get those items that have changed

Like the below code Query SharePoint change log with ChangeQuery and ChangeToken | Microsoft Learn

mkm17 commented 2 weeks ago

Hi @harshdamaniahd I am not sure about your particular case, but I think that all methods to get the content of the page are good. I will also add one additional method using CLI for M365