Connect to SharePoint online from .net console application and Azure functions

john john 1,026 Reputation points
2022-06-10T01:59:01.35+00:00

We have 2 SharePoint online tenants which have ApplOnlyPermission disabled, and we need to do the following for creating a scheduled jobs which connect to SharePoint online:-

1) On the first tenant, we want to develop a .net console application which runs on Windows server 2016 on-premises and scheduled using windows task scheduler.

2) On the second tenant, we want to develop an Azure scheduled function.

At this stage i need to list what are the licenses and subscription we need to have. And based on my reading on these 2 links Granting access via Azure AD App-Only & App only authentication in SharePoint Online using latest Azure sdk, i listed those :-

1) Subscription for Azure App Registration
2) Subscription to key valult to store the certificate
3) Generate a self-signed certificate
4) For azure function we need a subscription to it (which i think will be per usage).

Question one) Is my list correct and complete? or i am missing something.

Second question, now i know that using self-signed certificates should only be used for testing purposes and should never used in live systems, but on the above 2 links they are using self signed certificates, so is this fine to use self signed certificates on live applications in our case?

Thanks

Microsoft 365 and Office | SharePoint Server | For business
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | SharePoint Server | Development
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,486 Reputation points Microsoft External Staff
    2022-06-10T07:52:04.267+00:00

    Hi @john john ,
    Per my research, you can refer to following article to connect sharepoint with Azure functions. In this article, you will learn how to authenticate SharePoint online and get a context in Azure functions using PnP.Framework.
    https://www.c-sharpcorner.com/article/authenticate-sharepoint-using-pnp-framework-in-an-azure-functions/

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.