I'm new to rclone and wondering if I can use a SharePoint encrypted link/URL in a 'rclone copy' command.
I mean links that look like this:
Or is there another way to translate such a link to a "normal" path-like link?
Hope you can help.
You could try using
rclone config and adding that link in to one of the config options (eg microsoft graph). I don't know whether that will work though! (There are a very large way of configuring onedrive/sharepoint!)
Thanks Nick, for your suggestion. I will look into it.
Sorry for my late reaction.
I haven't found the config option "microsoft graph". I tried some other options but they didn't work out succesfully. I also expect that putting the link in a config will not solve my "problem".
Maybe I it helps if I give you some more context:
a user copies a link to a file in SharePoint (via button 'Copy link' in SharePoint online in a webbrowser) e.g. "https://my_SharePoint/:f:/s/my_SharePoint_site/EnPprgkg-BpPtjOXgYlH1FABP0b8sn2C-wqDUtFMGz1_mQ?e=Lm6abo"
I want to use (a part of) this link in a 'rclone copy' command e.g. 'rclone copy my_Localfile my_Remote:/EnPprgkg-BpPtjOXgYlH1FABP0b8sn2C-wqDUtFMGz1_mQ?e=Lm6abo'
(can my_Localfile' also be a dot to use the original name of the file in SharePoint?)
I hope this gives you a better understanding and are looking forward to your reaction (or questions).
Sorry, I mis-understood what kind of link you had. (I'm not a sharepoint expert alas!)
What happens if you put that URL in the browser - does it get expanded to something different? I suspect you may be able to take either a drive ID or a site ID or a folder ID out of the expanded URL and use it in rclone - would that be helpful?
The other thing you might be able to do in the browser is add the folder to your account so it appears in the Shared section - then rclone should be able to find it and access it there. Update - looks like that doesn't work yet: Implement OneDrive shared with me · Issue #4062 · rclone/rclone · GitHub
If I put the (encrypted) URL in the adress bar of my (Firefox) browser then te URL stays the same (not expanded) and the browser opens the file (for instance) in Word or Excel online). So that is sadly not the solution.
For your understanding I will explain my case better:
- In our ERP system (on a Windows Desktop server) users can link files to certain entities in our database (e.g. Projects) wherefor they use the mentioned encrypted SharePoint URL.
- Based on such entities (Projects) we can send an e-mail to the customer where we want to use the linked file (via the SharePoint URL) as an attachment.
- The actual making and sending of the e-mail message happens on a Linux machine that is not connected to SharePoint, so we want to copy the SharePoint file (via the encrypted URL and rclone) to a "normal" file on that Linux machine, where the copied file can be attached to the mail. This as an automated/programmed proces.
Considering this, do you think this is achievable with rclone?
An alternative idea can be that we insert the encrypted SharePoint URL in te mailbody itself and see how that turns out in practice. In that case the receiver of the e-mail can (hopefully) open the SharePoint file via that link.
I think, most likely, it would need some things adding to rclone to make it work.
Do you happen to know which API you use for generating the encrypted SharePoint URLs?
Maybe there is an API to reverse that?
Could you send me a URL (with something non-confidential) that I could look at? You can private message me if you want.
An alternative which will take a bit more programming is to use something like selenium to automate the download of the file from the link using a headless web browser.