0

I would like to create an API to get the SharePoint list data using CSOM and Azure functions.

This article explains to get the data from SharePoint. But i do not want to put my user name and password into the code.

Is there a SharePoint API that can be exposed by a token so that it is secure to retrieve the SharePoint List e.g. AADHttpclient. This article explains how to secure the azure function but instead of consuming the Azure function. I would like to have an SharePoint API that i can consume in my Azure function API.

user1339913
  • 1,017
  • 3
  • 15
  • 36

1 Answers1

0

To configure permissions, you could configure your Azure Function to uses Access Token authentication. That way you will get Azure AD App created for you, and there you can configure necessary permissions for a resource. Both Microsoft Graph and SharePoint Online are available as resources. Afterwards, you can either use Microsoft Graph API or SharePoint CSOM, depending on the API Access that you select.

enter image description here

Dragan Panjkov
  • 4,302
  • 4
  • 28
  • 26