Creating a custom list inside appweb “programmatically” for a provider hosted sharepoint add-in

Copper Contributor

I am new to Sharepoint development and I am looking for a way to create a new list inside appweb space (this list will be specific to the addin) for a provider hosted add-in. I understand I can create a list using visual studio during addin development and deploy the addin. I read this reference from Microsoft about creating list inside a provider hosted add-in

But I don't want to make changes to the add-in, so I am looking for a way to create a similar list using the sharepoint API directly. Is there any specific reason not to use the Sharepoint API and use the add-in to create such a list ? I am not sure if this is even possible for a provider hosted add-in (creating a list inside app web instead of the usual sharepoint space).

2 Replies

@Abi175 If I understand correctly you want to create list in SharePoint as one time activity. Then why don't you write a small console using csom/jsom code to create a list and define the as per your needs.

CSOM Crud Operation

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/hh185005(v%3Doff...

JSOM Crud Operation

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/hh185005(v%3Doff...

@Vikram_Samal Thank you for your reply. I was looking to use the API directly instead of using CSOM or visual studio addin template. I figured that I can create a list using the Create list REST API after getting the correct App Web Url (which I was missing earlier).