Azure Functions with Office 365 SharePoint Calls - Creating, Debugging & Deploying NodeJS Functions

Updated: Mar 29, 2019

Let us have a detailed look at creating azure functions using visual code, creating sharepoint context for getting site data, debugging locally using visual code, and deploying the code to Azure function app from visual code.

Creating Azure Function using Visual Code:

Setup and install the prerequisites for developing azure functions using visual code.

  • Install the visual code on your machine and install all prerequisites required for developing azure functions.

  • Install the latest of NodeJS.

  • Then install the core tools package required for working with Azure functions. 

The extensions being enabled on the visual studio can be found in the following snapshot.

Once the visual code is ready, Create the Azure function from Azure tab on visual code.

  • Click on new project icon to create the project. Select the language as Javascript.

  • Then click on create function icon to add function to the project. You will be prompted for

  1. thefunction folder, 

  2. function template, 

  3. the function name and 

  4. the authentication level.