question

Adz-7732 avatar image
0 Votes"
Adz-7732 asked saldana-msft edited

SharePoint API vs Microsoft Graph API?

We are starting work on a new project that requires Read only functionality from SharePoint and OneDrive (for data archiving purposes).

We are at a bit of a standstill as whether to use the SharePoint API or Graph API.

I don't think we have enough resources to implement both solutions. However, saying that, the Graph API is the API that will be receiving long term support from what I've read.

office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RaytheonXie-MSFT avatar image
1 Vote"
RaytheonXie-MSFT answered RaytheonXie-MSFT commented

Hi @Adz-7732 ,
I will recommend you Microsoft Graph API. Microsoft Graph is a RESTful web API that enables you to access Microsoft Cloud service resources. After you register your app and get authentication tokens for a user or service, you can make requests to the Microsoft Graph API. Microsoft Graph becomes useful when you wish to link several resources types in one point. Also as trevorseward said, The SharePoint API isn't being developed any longer. So the Graph might be a better choice for us.


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.




· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just to be clear, I'm talking about the SharePoint REST API v1

0 Votes 0 ·

Hi @Adz-7732 ,
Since you are working with OneDrive. I will recommend you Graph API. You can use Microsoft Graph to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries. With Microsoft Graph, you can build a variety of experiences with files stored in Microsoft 365, from simply storing user documents to complex file-sharing scenarios.
Please refer to the following document
https://docs.microsoft.com/en-us/graph/api/resources/onedrive?view=graph-rest-1.0

0 Votes 0 ·

Hi @Adz-7732 ,
If there's anything you'd like to know, don't hesitate to ask.

0 Votes 0 ·
trevorseward avatar image
1 Vote"
trevorseward answered Adz-7732 commented

Always use the Graph API. The SharePoint API (generally) isn't being developed any longer. Investments are going into the Graph API.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just to be clear, I'm talking about the SharePoint REST API v1

0 Votes 0 ·