Adding Sharepoint SiteID

Wow! This is an amazingly useful utility!!! Huge fan!

I am having trouble with determining correct parameter to use for the onedrive siteid.

I am able to use onedrive business connector, so I am feeling confident in the config and can get by with this, but would really like to be able to integrate with onedrive sharepoint site.

What is the problem you are having with rclone?

Unable to figure out correct syntax to add Site ID for onedrive business

What is your rclone version (output from rclone version)

rclone version
rclone v1.52.3

  • os/arch: linux/amd64
  • go version: go1.14.7

Which OS you are using and how many bits (eg Windows 7, 64 bit)

AWS Linux, x64

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

sharepoint.com

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Choose a number from below, or type in an existing value
 1 / OneDrive Personal or Business
   \ "onedrive"
 2 / Root Sharepoint site
   \ "sharepoint"
 3 / Type in driveID
   \ "driveid"
 4 / Type in SiteID
   \ "siteid"
 5 / Search a Sharepoint site
   \ "search"
Your choice> 4
Paste your Site ID here>   ??? what goes here ???

I've really need help figuring out what to put here in Site ID

The rclone config contents with secrets removed.

rclone config
Current remotes:

Name                 Type
====                 ====
eai-vmn-onedrive     onedrive

A log from the command with the -vv flag

[jchurchill@ip-10-242-103-78 ~]$ rclone -vv config
2020/08/26 18:08:13 DEBUG : rclone: Version "v1.52.3" starting with parameters ["rclone" "-vv" "config"]
2020/08/26 18:08:13 DEBUG : Using config file from "/home/jchurchill/.config/rclone/rclone.conf"
Current remotes:

Name                 Type
====                 ====
eai-vmn-onedrive     onedrive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n
name> eai-bi-sharepoint
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / 1Fichier
   \ "fichier"
 2 / Alias for an existing remote
   \ "alias"
 3 / Amazon Drive
   \ "amazon cloud drive"
 4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc)
   \ "s3"
 5 / Backblaze B2
   \ "b2"
 6 / Box
   \ "box"
 7 / Cache a remote
   \ "cache"
 8 / Citrix Sharefile
   \ "sharefile"
 9 / Dropbox
   \ "dropbox"
10 / Encrypt/Decrypt a remote
   \ "crypt"
11 / FTP Connection
   \ "ftp"
12 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"
13 / Google Drive
   \ "drive"
14 / Google Photos
   \ "google photos"
15 / Hubic
   \ "hubic"
16 / In memory object storage system.
   \ "memory"
17 / Jottacloud
   \ "jottacloud"
18 / Koofr
   \ "koofr"
19 / Local Disk
   \ "local"
20 / Mail.ru Cloud
   \ "mailru"
21 / Mega
   \ "mega"
22 / Microsoft Azure Blob Storage
   \ "azureblob"
23 / Microsoft OneDrive
   \ "onedrive"
24 / OpenDrive
   \ "opendrive"
25 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
26 / Pcloud
   \ "pcloud"
27 / Put.io
   \ "putio"
28 / QingCloud Object Storage
   \ "qingstor"
29 / SSH/SFTP Connection
   \ "sftp"
30 / Sugarsync
   \ "sugarsync"
31 / Tardigrade Decentralized Cloud Storage
   \ "tardigrade"
32 / Transparently chunk/split large files
   \ "chunker"
33 / Union merges the contents of several upstream fs
   \ "union"
34 / Webdav
   \ "webdav"
35 / Yandex Disk
   \ "yandex"
36 / http Connection
   \ "http"
37 / premiumize.me
   \ "premiumizeme"
38 / seafile
   \ "seafile"
Storage> onedrive
** See help for onedrive backend at: https://rclone.org/onedrive/ **

Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n>
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> n
For this to work, you will need rclone available on a machine that has
a web browser available.

For more help and alternate methods see: https://rclone.org/remote_setup/

Execute the following on the machine with the web browser (same rclone
version recommended):

        rclone authorize "onedrive"

Then paste the result below:
result> {"access_token": ......  }
2020/08/26 18:08:58 DEBUG : eai-bi-sharepoint: Saved new token in config file
Choose a number from below, or type in an existing value
 1 / OneDrive Personal or Business
   \ "onedrive"
 2 / Root Sharepoint site
   \ "sharepoint"
 3 / Type in driveID
   \ "driveid"
 4 / Type in SiteID
   \ "siteid"
 5 / Search a Sharepoint site
   \ "search"
Your choice> 4
Paste your Site ID here> https://viacom.sharepoint.com/sites/EnterpriseBusinessIntelligence/Shared%20Documents/Forms/AllItems.aspx?viewid=8fa679c2%2D5248%2D4c70%2Db80d%2Da3e27252eba9&id=%2Fsites%2FEnterpriseBusinessIntelligence%2FShared%20Documents%2FUnity%20%2D%20ViacomCBS
2020/08/26 18:10:55 DEBUG : eai-bi-sharepoint: Failed to read token out of config file: section 'eai-bi-sharepoint' not found
2020/08/26 18:10:56 DEBUG : eai-bi-sharepoint: Saved new token in config file
2020/08/26 18:10:57 Failed to query available drives: HTTP error 400 (400 Bad Request) returned body: "{\r\n  \"error\": {\r\n    \"code\": \"invalidRequest\",\r\n    \"message\": \"Invalid hostname for this tenancy\",\r\n    \"innerError\": {\r\n      \"date\": \"2020-08-26T18:10:57\",\r\n      \"request-id\": \"e25c3b74-511d-4776-8504-a7c6fc4d6ce9\"\r\n    }\r\n  }\r\n}"

^^ Full URL

Your choice> siteid
Paste your Site ID here> /sites/EnterpriseBusinessIntelligence/Shared%20Documents/Forms/AllItems.aspx
2020/08/26 18:22:42 Failed to query available drives: HTTP error 400 (400 Bad Request) returned body: "{\r\n  \"error\": {\r\n    \"code\": \"BadRequest\",\r\n    \"message\": \"Resource not found for the segment 'EnterpriseBusinessIntelligence'.\",\r\n    \"innerError\": {\r\n      \"date\": \"2020-08-26T18:22:42\",\r\n      \"request-id\": \"b186ccf4-6f85-47a7-a333-326225a425bb\"\r\n    }\r\n  }\r\n}"

^^ Partial: /sites/EnterpriseBusinessIntelligence/Shared%20Documents/Forms/AllItems.aspx

 4 / Type in SiteID
   \ "siteid"
 5 / Search a Sharepoint site
   \ "search"
Your choice> 4
Paste your Site ID here> 7BE3DE2F-C548-4948-9DAB-E5FBF5A84A30
2020/08/26 18:37:21 Failed to query available drives: HTTP error 404 (404 Not Found) returned body: "{\r\n  \"error\": {\r\n    \"code\": \"itemNotFound\",\r\n    \"message\": \"Requested site could not be found\",\r\n    \"innerError\": {\r\n      \"date\": \"2020-08-26T18:37:21\",\r\n      \"request-id\": \"c80a56ec-5ac3-4165-afdc-de45f4b21535\"\r\n    }\r\n  }\r\n}"
[jchurchill@ip-10-242-103-78 ~]$ rclone -vv config
2020/08/26 18:38:26 DEBUG : rclone: Version "v1.52.3" starting with parameters ["rclone" "-vv" "config"]
2020/08/26 18:38:26 DEBUG : Using config file from "/home/jchurchill/.config/rclone/rclone.conf"

^^ I've also tried various hexcodes that I think sharepoint might be using to represent the document list... but no luck.


Would appreciate anyone's insights!

I'm having the same question:
I tried the ID I find in /_api/web url but they don't work

Hello guys

I had the exact same issue.
Crashing the program...

Solution is silly: the right ID is /_api/site/id (and NOT /_api/web/id :wink: )

Cheers

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