Hello @OldButYoungDev
Thanks for reaching out!
You can use https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/items/{folder-id}/children
endpoint to list down the children of a folder in the drive. Please note that here folder-id is nothing but an item-id.
In above endpoint, you need to pass parentfolderID of a folder for which you need to list down the children. Post that, you can replace the parentfolderID with the childFolderID, which will further list the children of childFolder. More precisely, you need to make multiple calls to get into the last child folder.
Steps to follow:
https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/root/children
- will list all the children of drive,
followed by
https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/items/{folder-id}/children
OR
https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/items/{item-id}
Screenshot for reference:
Hope I have answered your query.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.