Authenticate our Asp.NET Core console application against SharePoint online

john john 966 Reputation points
2021-08-26T11:34:04.71+00:00

We have a newly created SharePoint online tenant, which have its SharePoint app-only permissions disabled >> and we do not want to enable it.

Now we are going to write a console application to integrate with SharePoint online >> but one of the most confusing thing i have ever read is about how we can do so... as most of the approaches mentioned are using deprecated approaches.. so finally i found those 2 main approaches:-

https://www.vrdmn.com/2020/06/using-net-standard-csom-and-msalnet-for.html

AND

https://sharepointstew.wordpress.com/2021/07/07/app-only-authentication-in-sharepoint-online-using-latest-azure-sdk/

so i have the following questions:-

1) which approach is still not deprecated?
2) which approach is recommended and why?
3) is there a third approach which is better to use?

Thanks

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,826 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,044 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 36,171 Reputation points Microsoft Vendor
    2021-08-27T08:15:31.787+00:00

    Hi @john john ,
    I would rather recommend you to take first approach.In second link ,such as SharePointPnPCoreOnline and Microsoft.Azure.KeyVault which are now deprecated and are not maintained.The first approach use CSOM will be better for you.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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.

    1 person found this answer helpful.

Your answer

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