0

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

enter image description here

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 approach 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 approach 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

1 Answer 1

0
  1. Microsoft recommend using the Microsoft Graph API wherever possible but you can use CSOM (particularly because some things are not currently possible via the Microsoft Graph API).
  2. I would prefer to use the PnP Core SDK since it uses the most appropriate API wherever possible e.g. the Microsoft Graph. Technically, the library could stop being maintained in the future but the underlying APIs it uses are supported by Microsoft. Additionally, it's open source so you could always make appropriate fixes/changes to the library if required.
  3. Microsoft Graph API documentation:

Create a new folder in a drive

Update sharing permission

I can't find Graph API documentation relating to setting column default values based on location. I believe it's only possible via CSOM currently.

1
  • 1
    thanks a lot for the helpful reply
    – John John
    Feb 20, 2023 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.