I want to write an Azure Function deployed inside Azure and which run on timer schedule. but i am not sure which library i should user, either:-
CSOM
PnP Core
what are the main differences and when you use each?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityThe key differences are:
CSOM:
PnP Core SDK
It would be better to use the PnP Core SDK where possible, for a few reasons:
This is usually the Microsoft Graph, which Microsoft recommend you use to interact with Microsoft 365. Where the Graph doesn't have the appropriate functionality yet, PnP Core will fallback to using the SharePoint REST API or CSOM.
"CSOM and REST don't have a predetermined resource unit cost and they usually consume more resource units than Microsoft Graph APIs to achieve the same functionality. And in addition to resource unit limits, CSOM and REST are also subject to other internal resource limits, so if applications call CSOM and REST, they may experience more throttling than the limits described in this document. We highly recommend you choose Microsoft Graph APIs over CSOM and REST APIs when possible."
By using PnP Core, you'll be future proofing your app to work with newer versions of .NET
while CSOM will not?
Jan 31 at 16:12