SharePoint REST API: Not able to get list through API

Bas Nab 5 Reputation points
2025-03-07T13:16:15.1433333+00:00

I am trying to get a list through the use of the sharepoint API.

If I am logged in I can access the XML response through the following URL: https://{sitenumber}.sharepoint.com/sites/AI/_api/web/lists/GetByTitle('[ListTitle]')

When I use an API call with OAuth enabled I get a 404. So it sais it does not exist.
If I try to list out all the lists within the AI site it displays the default lists, but not the new list I created.

I've tried numerous things like checking whether the list is hidden or find it by the GUID but that does not work.

I also tried to find settings to open up the list for API calls but can't find any such setting.
Getting userdetails through the API delivers my own credentials so OAuth seems to be working.

What am I missing?

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,405 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Xyza Xue_MSFT 29,356 Reputation points Microsoft External Staff
    2025-03-10T06:51:42.8933333+00:00

    Hi @Bas Nab ,

    Thank you for posting in this community. During my testing, even newly created Lists can be retrieved by the SharePoint REST API.

    It seems like you're able to authenticate via OAuth and can access certain SharePoint data, but you're facing an issue where an API call for a specific list returns a 404 error. Here are some troubleshooting steps to help you resolve the issue:

    1. Verify List Permissions

    Ensure that the list you're trying to access is not restricted by permissions. If the list has unique permissions or is hidden from certain users, your API call might be blocked.

    1. Check List Title and API Endpoint

    Double-check the list title in the URL you're using. In SharePoint, the title might not be exactly as you expect (e.g., there might be special characters or trailing spaces). Try using the List GUID instead of the title to see if that resolves the issue. For example, instead of calling /GetByTitle, try using /GetById if you have the list's GUID.


    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.