Error 404 Multi-Status when trying to access a One-drive folder shared by others

Advertisement

nikoluis
Joined:
Posts:
2
Location:
Greece

Error 404 Multi-Status when trying to access a One-drive folder shared by others

Hello
I have created an App in .NET 4.8 and I use WinSCP wrapper. During my tests, I was using my own OneDrive account. It worked great, I followed the instructions here (Connecting securely to Microsoft OneDrive with WebDAV). It works with or without MFA. Now, here is the tricky part. A friend of mine shared a folder on his One Drive and sent me an invitation. His invitation was mentioning a folder named (for example) Shared_folder. I want to make my application connect and view/upload files to this folder. When I clicked his invitation, I saw that the CID on the One Drive URL was different than mine, which means that I have to use his CID as a root folder, but still use my own credentials to login. Based on these information, the login information and directories I should pass to the WinSCP wrapper should be:
  • address=d.docs.live.net
  • rootpath=/MY_FRIENDS_CID
  • subfolder=Shared_folder (the folder name I got on the invitation email)
  • username=my_OWN_windows_live_email
  • password=my_password (or MFA password, depending on whether i have enabled it or not)
Unfortunately the connection fails with error "Error listing directory "Shared_folder" 404 Multi-Status". The same occurs within the WinSCP application. In there I use the /MY_FRIENDS_CID/Shared_folder as Remote directory. Any ideas on how i should treat the connection to a Onedrive folder shared by others?

ps. When I used rootpath=/MY_FRIENDS_CID/Shared_folder, I get the same 404 error but with message "Error changing to /MY_FRIENDS_CID/Shared_folder". It seems to connect but fails to list folders. Could it be a directory access from my friends side?

Reply with quote

Advertisement

nikoluis
Joined:
Posts:
2
Location:
Greece

Please forget it, there was no issue with the WinSCP. In case anybody has the same need (access a shared folder in One Drive), here is the scenario:
  1. USER-1 has an account at One Drive (with/without MFA, it does not matter)
  2. USER-2 creates a folder FOLDER1 and in there a FOLDER2 and he shares FOLDER2 to USER-1
  3. In order for USER-1 to access FOLDER2 from WinSCP (or any similar app, I presume), he must enter the credentials to his OWN Microsoft account and on the Remote path he must enter /USER-2-CID/FOLDER1/FOLDER2. He will get the directory listing, but if he double-clicks on .., he will not be able to go to previous folder and he will see the message "Access forbidden"
My mistake was at 3. My friend sent me an invitation, I clicked on it, I saw the CID and the shared folder name, but I did not know the full path to that folder. We need the FULL path anyway.

That's all. Thanks.

Reply with quote

Advertisement

You can post new topics in this forum