Forum Discussion

Pieter Veenstra's avatar
Jul 11, 2017
Solved

SPFx and SQL in Azure

Are there any examples available of SPFx using a SQL Azure database?
  • VesaJuvonen's avatar
    Jul 11, 2017

    Since there's no native SQL connectivity from JavaScript, which makes sense (no way to hide connection details), you'd be looking to have a service, which provides the needed access. This could be implemented as WebAPI or as Node.js application hosted in Azure.

     

    You'd secure the call from SPFx to WebAPI using Azure capabilities and then provide needed operations towards your SQL Azure database (or any other service) from the WebAPI.

     

    See following for additional details on how to secure the traffic between SPFx solution and WebAPI - https://dev.office.com/sharepoint/docs/spfx/web-parts/guidance/connect-to-api-secured-with-aad. 

Resources