SharePoint Online API - Get List Items returns no results

Viewed 33

Been trying to query a very simple list on my SPO tenant and the response always comes back successful but with no results. I have another list in the same SPO site that I can query and I do get results back from that one (that one was created quite some time ago). I've looked everywhere for permissions settings that might not allow others to see the list items, but as far as I can tell, it is set up exactly like the list that works. I'm hitting this URL after authenticating (authentication works fine - using the accounts.accesscontrol.windows.net method for that, as I'm doing all of this in a REST client to test):

https://mytenantname.sharepoint.com/sites/MySPOSiteName/_api/web/lists/getbytitle('MyListName')/items

Any reason why, in the same SPO site and with both lists using the same permissions, that one list would return results and the other would not? I have also checked to make sure neither list requires approvals for the list items to be available.

1 Answers

To get list items from SharePoint list, try using REST endpoint in this format with /items:

https://mytenantname.sharepoint.com/sites/MySPOSiteName/_api/web/lists/getbytitle('Display Name of List')/items

Documentation: Working with lists and list items with REST

Related