If someone in OneDrive for Business shares with me a folder that is not in the root of their drive, rclone can't ls it. (Didn't try other operations, since I can't ls it at all).
Looking at the output of --dump bodies, the reason is that rclone tries to access the parent directories of the path provided, but OneDrive returns a 404 for those. (Trying it in the MS Graph Explorer, I can get the folder if I go to it directly, but I get a 404 for any of the parent directories of the path.)
What is your rclone version (output from rclone version)
rclone v1.53.1
- os/arch: linux/amd64
- go version: go1.15.2
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Linux 5.8.12.a-1-hardened x86_64
Which cloud storage system are you using? (eg Google Drive)
OneDrive for Business
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone lsl <remote>:<path to folder>
The rclone config contents with secrets removed.
[<remote>]
type = onedrive
token = {"access_token": <snip>, "expiry": <snip>}
drive_id = <snip>
drive_type = business
A log from the command with the -vv flag
~ $ rclone -vv lsl <remote>:<path to folder>
2020/10/05 02:45:38 DEBUG : rclone: Version "v1.53.1" starting with parameters ["rclone" "-vv" "lsl" "<remote>:<path to folder>"]
2020/10/05 02:45:38 DEBUG : Using config file from "/home/angelsl/.config/rclone/rclone.conf"
2020/10/05 02:45:38 DEBUG : Creating backend with remote "<remote>:<path to folder>"
2020/10/05 02:45:38 ERROR : : error listing: directory not found
2020/10/05 02:45:38 DEBUG : 5 go routines active
2020/10/05 02:45:38 Failed to lsl with 2 errors: last error was: directory not found
I think I gave enough information, honestly, but it's OK.
I'll dig through the source and see if there is a workaround to avoid rclone trying to traverse the parent directories of the shared folder I'm trying to access.
If you give rclone a path, it needs to traverse the path to find the ID of the directory to list.
It sounds like you want to set up a onedrive remote using the search option in the rclone config wizard. I haven't tried this, but that is how you add random stuff from MS graph