Adding Client Side Web Part with SharePoint CSOM on Modern page

%3CLINGO-SUB%20id%3D%22lingo-sub-292421%22%20slang%3D%22en-US%22%3EAdding%20Client%20Side%20Web%20Part%20with%20SharePoint%20CSOM%20on%20Modern%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-292421%22%20slang%3D%22en-US%22%3E%3CP%3EI%20know%20there%20is%20PnP%20Core%20CSOM%20or%20PnP%20PowerShell%20cmdlet%20to%20add%20client%20side%20web%20part%20on%20particular%20modern%20page%20but%20trying%20to%20know%20if%20there%20are%20any%20Microsoft%20CSOM%20APIs%20as%20part%20of%26nbsp%3BMicrosoft.SharePointOnline.CSOM%20nuget%20package%20which%20can%20provide%20way%20to%20perform%20all%20CRUD%20operation%20on%20modern%20page%20as%20well%20as%20client%20side%20web%20part%20(SPFx%20web%20part).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F369%22%20target%3D%22_blank%22%3E%40Vesa%20Juvonen%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5670%22%20target%3D%22_blank%22%3E%40Bert%20Jansen%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-292803%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Client%20Side%20Web%20Part%20with%20SharePoint%20CSOM%20on%20Modern%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-292803%22%20slang%3D%22en-US%22%3EThanks%20Bert%20for%20your%20quick%20response.%20I%20was%20able%20to%20do%20this%20with%20PnP%20Sites%20Core%20and%20was%20just%20wondering%20if%20there%20are%20Official%20CSOM%20APIs.%20Currently%20we%20don't%20have%20dependency%20on%20PnP%20Site%20Core%20packages%20in%20our%20implementation%20and%20wanted%20to%20see%20if%20we%20can%20continue%20that.%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20again!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-292604%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20Client%20Side%20Web%20Part%20with%20SharePoint%20CSOM%20on%20Modern%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-292604%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20no%20official%20CSOM%20API's%20for%20manipulating%20client%20side%20pages%20but%20we're%20working%20on%20a%20graph%20API%20for%20creating%2Fupdating%20modern%20pages.%20This%20API%20however%20has%20not%20yet%20been%20released.%20As%20an%20alternative%2C%20you%20can%20use%20.Net%20API%20in%20PnP%20Sites%20Core%20when%20you%20use%20C%23%20code.%20That%20same%20API%20is%20also%20wrapped%20into%20a%20series%20of%20PnP%20PowerShell%20cmflets%20in%20case%20you%20prefer%20PowerShell%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

I know there is PnP Core CSOM or PnP PowerShell cmdlet to add client side web part on particular modern page but trying to know if there are any Microsoft CSOM APIs as part of Microsoft.SharePointOnline.CSOM nuget package which can provide way to perform all CRUD operation on modern page as well as client side web part (SPFx web part).

 

@Vesa Juvonen @Bert Jansen

 

Thanks in advance.

 

2 Replies
Highlighted

Hi,

 

There are no official CSOM API's for manipulating client side pages but we're working on a graph API for creating/updating modern pages. This API however has not yet been released. As an alternative, you can use .Net API in PnP Sites Core when you use C# code. That same API is also wrapped into a series of PnP PowerShell cmflets in case you prefer PowerShell

Highlighted
Thanks Bert for your quick response. I was able to do this with PnP Sites Core and was just wondering if there are Official CSOM APIs. Currently we don't have dependency on PnP Site Core packages in our implementation and wanted to see if we can continue that.

Thanks again!