CSOM vs PnP Core SDK vs Graph API, which approach is more future proof

john john 1,021 Reputation points
2023-02-19T23:20:17.95+00:00

We want to start a new project which include creating an azure function (using .net 6.0) that runs on timely basis to create folder structure as follow:-

  1. we have a SharePoint custom list which allows the user to define; the folder name, 4 managed metadata fields & Permission on who can read/write .
  2. then the Azure Function will loop through the list and for each list item will create a new folder structure, set its permissions and set the "Default Column values" for the new folders

User's image

i worked on similar project around 4 years ago where i developed it using CSOM + Remote Event Receivers. but things has been changed since that time, and seems CSOM is now becoming a legacy appraoch in favor to Graph API. so can anyone help me in answering those 3 questions please:-

  1. Should we stay away from using CSOM? as i know CSOM depend on SharePoint APIs and SharePoint APIs are no longer been developed by Microsoft.
  2. I read about the PnP Core SDK, which uses Graph API behind the scenes and fail back to SharePoint API.. so is this the right appraoch to us? as can we guarantee that this library will stay been maintained since it is an open source?
  3. If we will end up using Graph API inside Azure Function, then are the functions we are planning to implement supported by Graph API (set folders' structure, set the folders' permissions & set the folders' Column default values)?

Thanks

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2023-02-20T08:14:21.81+00:00

    Hi @john john

    Microsoft will continue to support CSOM and REST API. You need to choose different API for different development scenarios.For Front-end development(like SharePoint FrameWork...) you could use REST API or Graph API,for Back-end development(SharePoint Addin),you could use CSOM and REST API. Currently there is some function Graph doesn't support. You can raise a ticket in User Voice. With requirements like this increase, the problem may well be released in the future.


    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most 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.