How to get children from a sharepoint list item using msgraph v1.0?

Leandro Alves Silva 0 Reputation points
2024-03-14T14:46:14.8166667+00:00

Yesterday my code stopped working to retrieve a list of files from a folder.

The scenario is as follows: the folder is an item from a SharePoint list.

The URL I was using is: https://graph.microsoft.com/v1.0/sites/{domain}:/sites/{alias}:/lists/{list_id}/items/{number_item}/driveItem/children?$select=id,name,createdDateTime,parentReference,folder,file

The folder still exists with the same number, and nothing has changed within the folder in terms of file structure or names. Token is right.

I don't know what is wrong.

This is what I've been receiving from the request since yesterday.

{
    "error": {
        "code": "invalidRequest",
        "message": "Invalid request"
    }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,592 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,628 questions
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 31,076 Reputation points Microsoft Vendor
    2024-03-15T02:33:05.3833333+00:00

    Hi @Leandro Alves Silva,

    Per my test, I could use the api to get children from a sharepoint list item. Please refer to following test result

    User's image

    Could you check if the api works currently?


    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.


  2. Leandro Alves Silva 0 Reputation points
    2024-03-28T21:09:34.79+00:00

    I'll consider it a temporary bug since it stopped working and then started working again on March 21 in the same manner.

    Therefore, without any changes or adjustments, I consider the issue resolved.

    0 comments No comments