Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Office Graph API - get items from list

Is there a way within the Office Graph API to access items in a specific list - and not just items that I can see, but items I may not have access to?

like image 747
Chris Eaheart Avatar asked Feb 17 '16 19:02

Chris Eaheart


People also ask

How do you get a SharePoint list data from a graph API?

The following example shows how to get a list from a SharePoint Online list title. GraphServiceClient graphClient = new GraphServiceClient( authProvider ); var list = await graphClient. Sites["{site-id}"]. Lists["{list-id}"] .

How do I upload a SharePoint file to graph API?

According to my research and testing, you can use the following Graph API to upload files to SharePoint drive: PUT /sites/{site-id}/drive/items/{parent-id}:/{filename}:/content.


1 Answers

Microsoft Graph access to SharePoint objects is currently in the beta version of Graph. See https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/sharepoint.

To access specific items, the endpoint pattern would be: GET https: //graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}/items/{item-id}

For example: https:// graph.microsoft.com/beta/sites/mytenant.sharepoint.com:/sites/mysite:/Lists/Announcements/Items/1

As for being able to access items you do not have access to: No. That would be a horrible security problem if you could use any API to access such items.

like image 99
PaulE Avatar answered Oct 28 '22 01:10

PaulE