The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Thank you for sharing the solution, but because the rules restrict you from tagging the answers you post, so to help more people with similar questions, I will quote your content below, please click "Accept the answer" so that more people can see it.
Question:
Use this endpoint in MS Graph Explorer.
https://graph.microsoft.com/v1.0/me/drive/root:/xBackup/movies:/children
Expect the result to include all the file names under the "xBackup/Movies" directorie, including sub directories; however it only list the names of the sub directories and not file names.
Solution:
4 separate endpoints - one for each bottom child directory. such as Parent root/- Child 1, Child 2, Child 3, Child 4} ie xBackup/movies - {Movies - Listened to, 2,3,4}
- MS Graph Explorer doesn't support Multi level children ie
https://graph.microsoft.com/v1.0/me/drive/root/children?$expand=childrenError if Multi level children - Get list of all sub directory names:-
https://graph.microsoft.com/v1.0/me/drive/root:/xBackup/movies:/children?select=name - Finally, had to do 4 separate queries, one for each of my sub directories: Used
https://graph.microsoft.com/v1.0/me/drive/root:/xBackup/movies/Movies - Listened to:/children?$Select=nameReturned list of filename and extension
Hope this helps.