I have one SharePoint On-Premises site which is accessible outside of my server. I already have few lists & libraries created on that site which I am using.

I have one Office 365 SharePoint subscription where I am using some modern inbuilt as well as custom web-parts.

In one of my Web-part, I have a form & I want data from SP On-Premises lists (E.G. Countries, Cities, etc.) to bind into drop-down available in SPFx form. I also want to post (save) form data to SharePoint On-Premises list (e.g. Customer Information).

Kindly help me by providing detailed information about How can I perform my operations.

I am using only SPFx solution so Kindly provide me the solution for my SPFx solution only.

2 Answers 2


You can design an Azure function or self-hosting web service that will connect to SP On-prem and get or post data from/to a list. Use the web service in your SPFx web part. If you need to authorize a user making a call to the function, register an Azure AD App and enable authorization for your Function App as described here.

  • Thanks for your response. Can we directly do something with SPFx webpart to achieve the same? like REST API or any other way?
    – Hardik
    Commented Sep 5, 2019 at 9:11
  • Kindly provide me simple & another way to achieve it.
    – Hardik
    Commented Sep 5, 2019 at 10:51
  • Create 2 Microsoft flow, One for bulk operation(which will create the record in SharePoint online from the record available in SharePoint on-prem list like Countries, Cities). The second one will trigger whenever any changes made in SharePoint online list. After that, you only need an SPFx form. ;) Commented Sep 11, 2019 at 10:33
  • Thanks Dmitry to provide me an idea.
    – Hardik
    Commented Sep 16, 2019 at 11:56

I have created one Web API to get/post data using SharePoint On-premises.

I have used EnableCors in ApiController to avoid CORS related cross domain error while accessing the Web API through SPFx webpart.

I have used simple Ajax call to get/post data by calling different functions & passing the parameters to my few functions.

I have hosted my Web API to local IIS & provided one end point URL so I can use same for further use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.