I have an Office 365 Subscription with Sharepoint Online.

I need to:

  1. Developing Custom Application that access an SQL Azure Database. Should I use Sharepoint AddIn in Visual Studio 2015/2017 ?
  2. Developing a Custom WebApi that access on SQL Azure Database

I just want to know if it is possible to host the Custom Application and WebApi on Sharepoint Online Platform and also, some clear and small guidline on how to do it.

Thanks to support

1 Answer 1


Yes, you can create a custom WebApi that can be called from SharePoint Online. Here are a couple of resources that will help you get started:

Build your own REST service with WebAPI 2


Update (March 12, 2017)

I'm working on a blog post that walks through the process of building and consuming a custom Web API from JavaScript code running in SharePoint Online. I've published a rough version of the post.

Walkthrough: Building a Custom Web API for use with SharePoint Online

  • Thanks Rob, the link you provide are really usefull. I need just a confirmation: from the two links it seems that on Sharepoint Online the way that microsoft invite to use when we develop custom app is to have a simple client page that implmenets webapi calls... Last time I work with sharepoint in 2010 version I remember to have wark using C# in page codebehind... Now what is the way that Microsoft invites to use in this case?
    – DarioN1
    Mar 11, 2017 at 14:24
  • You can't deploy managed code assemblies (i.e. those created in C# or VB) to SharePoint Online. No custom code executes on the SharePoint Online servers. It either executes in the client browser (JavaScript) or it executes on an external server (C#). Mar 11, 2017 at 14:29
  • Thanks Rob, so I had to develop my webapi, pubblish it on SP Online and then create and AddIn that works with simple html+js and ajax calls, right ?
    – DarioN1
    Mar 11, 2017 at 14:52
  • You can't publish the WebApi to SharePoint Online, you need to host it somewhere else. I suggest you host it in an Azure Web Site as demonstrated in the Securing Your WebApi blog post. In regards to the SharePoint Online piece: you don't need an Add-In. You can just create an HTML file in your Site Assets library and put the markup and JavaScript in there. You can then use a Content Editor Web Part to add the contents of this new file to a page. Mar 11, 2017 at 17:54
  • 1
    @SPKan You can build a web service that's hosted in SharePoint. See Building a SharePoint-Hosted WCF Service (youtube.com/watch?v=rje25vBQEDA) Jan 14, 2020 at 10:37

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.