Accessing a Sharepoint direct/emailed link

(I haven't been able to fully apply the template because I don't really know enough about the situation.)

What is the problem you are having with rclone?

I am not sure how to use it with a 3rd party Sharepoint link shared via email.

Basically, I have a link to a Sharepoint site that looks like (redacted):

https://somebusiness.sharepoint.com/:f:/s/portal/[bunch of base64 looking stuff and query string data]

It was emailed to me. I am not an employee of this business, I have no login for any other services for them. When I open the link for the first time, it prompts me to enter the email address it was sent to, and sends me a code. I enter the code, I can access the Sharepoint folder. After opening, the URL looks like:

https://somebusiness.sharepoint.com/sites/portal/[more readable path to document storage plus query string data]

I can upload stuff, download, delete, whatever. But it's frustrating. If I update things in subfolders, it's easy to lose track of. But nuking the entire thing and reuploading from a local directory is also a slow process. I mean, we all know why rsync and rclone were created, right?

But I have no idea whether this can be dealt with by rclone, or how. Or even what it's called, so I can Google it. "Sharepoint direct link"? "Sharepoint email link"? There's no button or menu on the Sharepoint interface to link it to eg. a OneDrive account.

I tried:

  • WebDAV (option 51)
  • https://somebusiness.sharepoint.com/sites/portal/ as the URL
  • vendor "other" (option 7)
  • my email address as the username

But I have no idea how to authenticate. Is it password? Bearer token? I tried the emailed code as a password, and when I run rclone lsd SomeBusiness: I get:

2024/06/22 19:39:45 ERROR : : error listing: couldn't list files: 403 FORBIDDEN: 403 Forbidden
2024/06/22 19:39:45 Failed to lsd with 2 errors: last error was: couldn't list files: 403 FORBIDDEN: 403 Forbidden

I can also try rclone lsd SomeBusiness:Customer/Redacted/Something and get:

2024/06/22 19:44:33 Failed to create file system for "SomeBusiness:Customer/Redacted/Something": read metadata failed: 403 FORBIDDEN: 403 Forbidden

If I clear the password and use the same code as the bearer token, same output.

Run the command 'rclone version' and share the full output of the command.

rclone v1.66.0
- os/version: ubuntu 24.04 (64 bit)
- os/kernel: 6.8.0-11-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.1
- go/linking: dynamic
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Unsure. Sharepoint? WebDAV?


Is this just something that can't be done with rclone? (And if so, does anyone know what I'm dealing with here?) Or is there some way to access this that's not the excrutiating web interface?

hi,

Can not access Shared with me files

not sure that is correct, as rclone has sharepoint

  1. post the output of rclone config redacted
  2. post the full output of rclone lsd SomeBusiness:Customer/Redacted/Something -vv --retries=1

Starting with my current WebDAV "vendor = other" approach. Note that before doing this (not each command, just each "session" of commands), I will ensure that I am logged out via the web interface, open the link anew, get the email code re-sent, and enter that as the password via rclone config to edit. I put my username as the email address the link was sent to.

Here's the config section in question from rclone config redacted. I also have to redact the domain itself, I'm sorry, but it's not something I can share:

[SomeBusiness]
type = webdav
url = https://somebusiness.sharepoint.com/sites/portal/
vendor = other
user = XXX
pass = XXX

(I didn't post the entire config because there were a bunch of other remotes in there that I don't want to share. I could not see any "global" information in there. Let me know if that's unhelpful and I'll backup the config, nuke all remotes except this one, and start again.)

$ rclone lsd SomeBusiness:'Customer/Redacted/Something' -vv --retries=1
2024/06/23 11:06:22 DEBUG : rclone: Version "v1.66.0" starting with parameters ["rclone" "lsd" "SomeBusiness:Customer/Redacted/Something" "-vv" "--retries=1"]
2024/06/23 11:06:22 DEBUG : Creating backend with remote "SomeBusiness:Customer/Redacted/Something"
2024/06/23 11:06:22 DEBUG : Using config file from "/home/jason/.config/rclone/rclone.conf"
2024/06/23 11:06:22 DEBUG : found headers: 
2024/06/23 11:06:23 Failed to create file system for "SomeBusiness:Customer/Redacted/Something": read metadata failed: 403 FORBIDDEN: 403 Forbidden

The sharepoint options are (4) sharepoint online, authenticated by Microsoft, but it's not linked to any MS account I have, or (5) sharepoint with NTLM auth, which I also don't have.

If I try to use my email address for option (4), it thinks the part after the @ is an auth directory.

Here's another attempt with that. rclone config redacted output for the section:

[SomeBusiness]
type = webdav
url = https://somebusiness.sharepoint.com/sites/portal/
vendor = sharepoint
user = XXX
pass = XXX

rclone lsd ... -vv --retries=1:

2024/06/23 11:17:32 DEBUG : rclone: Version "v1.66.0" starting with parameters ["rclone" "lsd" "SomeBusiness:Customer/Redacted/Something" "-vv" "--retries=1"]
2024/06/23 11:17:32 DEBUG : Creating backend with remote "SomeBusiness:Customer/Redacted/Something"
2024/06/23 11:17:32 DEBUG : Using config file from "/home/jason/.config/rclone/rclone.conf"
2024/06/23 11:17:32 DEBUG : found headers: 
2024/06/23 11:17:33 Failed to create file system for "SomeBusiness:Customer/Redacted/Something": wst:FailedAuthentication: Authentication Failure (AADSTS50034: The user account {EUII Hidden} does not exist in the myemaildomain.com directory. To sign into this application, the account must be added to the directory.)

(I know that it's annoying for me to redact and anonymise so much stuff while asking for help, but I need to be a bit careful. I do appreciate you trying to help here in spite of that.)

The item is not shared with me in a way that it appears in my OneDrive "Shared" section, even for the account using the same email address. I assume this is because it is some kind of 3rd party business account/organisation, and they do not want to allow access or account linking in that way. So:

Right click a item in Shared, then click Add shortcut to My files in the context

That step of the process can't be applied.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.