Forum Discussion

Bistro45's avatar
Bistro45
Copper Contributor
Nov 29, 2021

I'm a SysAdmin and need understanting of API REST CSOM Microsoft Graph

Hi, I'm a SharePoint SysAdmin and need to understand the way to access SharePoint Online site to: drop, Acces or delete file to libraires. Just need to clarify my knowledge to argue with the development Team

 

There seem to be 3 API to accès sites:

REST API

CSOM API

and the new one Microsoft Graph

Is theres others? 

 

With one is the best et secure way to use?

 

Sebastien Lepage

3 Replies

  • Joao Livio's avatar
    Joao Livio
    Iron Contributor

    Bistro45 

     

    In a few words resuming.

     

    For modern development in SharePoint Online, Microsoft released SPFx so developers become as 3rd parties. This is the new approach to developers create WebParts or created Teams Extensions and interact with the full abstraction layer for some Microsoft Cloud Services, such as  Bookings, Calendar, Delve, Excel, Microsoft 365 compliance eDiscovery, Microsoft Search, OneDrive, OneNote, Outlook/Exchange, People (Outlook contacts), Planner, SharePoint, Teams, To Do, Workplace Analytics. That is called Microsoft Graph

     

    Relative to your question in order to "drop, Access or delete file to libraries" this can be done directly in a WebPart, there is no need to use MS Graph, but you should create a governance committee to use it.

     

    You can consume CSOM Endpoints exposed as an API, or consuming directly by Rest API information on lists, so as Microsoft Graph endpoints, or use An Enterprise Application or App Registrations registered in your Azure Tenant.   

     

    With one is the best et secure way to use?

     

    It depends on the Problem to solve, but You should give access to Microsoft Graph to developers, because in Online you cannot Elevate Privilege's as used before using SSOM (Server Side Object Model)  this can be accomplished with your reality, and as a Developer I suggest you do it.   

     

    This is only my opinion, hope that helped you.

    • Bistro45's avatar
      Bistro45
      Copper Contributor
      By the the to exemple that a got, it uploard a file do aSharePoint Online librari from a linux/unix systeme and the other one is from a amazon service.
      • Joao Livio's avatar
        Joao Livio
        Iron Contributor
        Bistro45

        You can do anything, and you have several options, PowerShell, CSOM whatever, since it fit your needs. You don’t have to be thigh to SPFx, that’s because Graph is important, basically you can access almost anything with Graph and put the file we’re you want to. But to do that you have to access the Tenant.

Resources