O365 / python-o365

A simple python library to interact with Microsoft Graph and Office 365 API
Apache License 2.0
1.69k stars 424 forks source link

Can't get folder in onedrive #686

Open chualanagit opened 3 years ago

chualanagit commented 3 years ago

code: `storage = account.storage() my_drives = storage.get_drives() print(my_drives)

my_folders = list(my_drives[0].get_items()) print(my_folders)

items = list(my_folders[0].get_items()) print(items)`

output: [Drive: Documents] [Folder: Documents] []

why am I not getting any folder or files I have in my oneDrive when listing all drive and folder items???

My onedrive: image

alejcas commented 3 years ago

Maybe my_drives[0] is not your one drive...

Try storage.get_default_drive()

chualanagit commented 3 years ago

I tried that, the result is the same.

chualanagit commented 3 years ago

@janscas have you seen situation like this before?? Somehow onedrive is not connected to my_drives??

alejcas commented 3 years ago

No, for me the default drive is onedrive. Try looking into each drive files to see which one is onedrive. If none is onedrive maybe some permission is not well set

gabrielxcelis commented 2 years ago

Did you solve it @chualanagit ? I`m with the same problem.