Skip to content
Advertisement

php get sharepoint list items with microsoft graph API

I’ve access to a sharepoint list and i want to get the items from it with the graph API

I can view the list items in the browser on this URL: https://[TENANT_DOMAIN_NAME].sharepoint.com/sites/[SITE_NAME]/Lists/[LIST_NAME]

Created an azure app and setup the authentication with my work microsoft account, installed the msgraph-sdk-php

The authentication is working, i can view the list informations with this endpoint:

/sites/[TENANT_DOMAIN_NAME].sharepoint.com:/sites/[SITE_NAME]:/lists

In the response i can see the specific list, but i don’t know how to get the list data from specific list.

Tried to get it with:

/sites/[TENANT_DOMAIN_NAME].sharepoint.com/lists/[LIST_NAME]/items

The specified list was not found

Advertisement

Answer

I finally figured out the valid endpoint is:

/sites/[TENANT_DOMAIN].sharepoint.com:/sites/[SITE_NAME]:/lists/[LIST_NAME]/items?expand=fields
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement