Sharepoint to Google

The problem

Adding 1000ish sharepoint document libraries.
Sharepoint to Google Drive

Hey y’all!
My company (Microsoft based) is merging with another company (Google based).
I need to copy data from 1000-ish (one thousand-ish) sharepoint sites to Google Drive. These 1000 sites are barely used. Automatically created by user input from another application.

I have already deleted 1500sites with 0 files and 0 activity.
But still 1000 sites remain. Ranging from 2-3 files per library up to 300ish GB for 1 library.
I have tried:

  • merging libraries on sharepoint (with Sharepoint Online and PnP tools in Powershell, no rclone involved yet. which results in 1 large library with all subfolders without a clue which original library it came from)
  • copying the contents of libraries to a subfolder of a new "archive-2020" library (with Sharepoint Online and PnP tools in Powershell, no rclone involved yet. Which seems to be impossible, even with a 60line PS script)
  • Trying to add all 1000 sites as an Rclone remote. It looks like there is no automated way of doing this
  • adding the archive-2020 google shared drive was easy, I don't have any problems there. Sharepoint is the problem.

I am currently trying to figure out a way to add all sharepoint sites to Rclone using a CSV containing all sites. With their URLs and names as variables. URL to fetch the data, Names to create subfolders in my google shared drive.
I connected 1 sharepoint library which adds a drive ID to my rclong config file. But that drive ID does not match the ID sharepoint gives to their libraries/sites. Using SPO/PnP to fetch the Drive ID to write it into my config file using an automated script hasn't worked.

Tldr: how can I copy the content of 500-1000 sharepoint sites to 1-2 google drive shared drives? And is there any documentation on how to script the adding of multiple Sharepoint libraries ar remotes?

I don’t mind to do some bash/python/powershell scripting.

rclone version'

rclone v1.63.1
- os/version: Microsoft Windows 11 Pro 22H2 (64 bit)
- os/kernel: 10.0.22621.2134 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.20.6
- go/linking: static
- go/tags: cmount

Cloud storage system

Sharepoint Online and Google Shared Drives

The command I'm trying to run

Not really applicable. I am searching for the right command

The rclone config contents with secrets removed.

Not applicable yet

A log from the command that you were trying to run with the -vv flag

Not applicable yet```

Creating remotes automatically is easy, it will be the authentication that is the hard bit.

Do you have an admin/super user which can access all the sharepoint sites?

Assuming you do and you've set up a remote with it called sharepoint:, then you can override the drive_id to access the individual drives like sharepoint,drive_id=XXXXXXX: (I'm not a sharepoint expert and drive_id may be the wrong thing to be overriding but hopefully that gives you a hint!)

If you could share (with secrets redacted) what your sharepoint config looks like at the moment that would be useful!

You could then use the combine backend to join them up into one big remote. I'm not sure I'd recommend that with 1000 though. I think I'd probably just script an rclone sync for each drive_id and leave it running.

Thanks for your answer! Yeah, I do have an admin user who is admin and owner on all sites.

My current config looks like:

[google]
type = drive
client_id = randomnumbers.apps.googleusercontent.com
client_secret = GOCSPX-NL-randomnumbers
scope = drive
token = {"access_token":"randomnumbers","expiry":"2023-09-05T18:30:41.9445194+02:00"}
team_drive = randomnumbers
root_folder_id = 

[thijstest1]
type = onedrive
token = {"access_token":"randomnumbers","expiry":"2023-09-06T15:55:40.3835292+02:00"}
drive_id = randomnumbers
drive_type = documentLibrary

[thijstest2]
type = onedrive
token = {"access_token":"randomnumbers.","expiry":"2023-09-06T15:53:18.3035812+02:00"}
drive_id = randomnumbers
drive_type = documentLibrary

[thijstest3]
type = onedrive
token = {"access_token":"randomnumbers.","expiry":"2023-09-06T16:08:40.935065+02:00"}
drive_id = randomnumbers
drive_type = documentLibrary

[thijstestarchive]
type = onedrive
token = {"access_token":"randomnumbers","expiry":"2023-09-06T16:14:51.1061884+02:00"}
drive_id = randomnumbers
drive_type = documentLibrary

Drive ID's and tokens all differ on those sharepoint sites. all being numbers and letters. But the 'hash' looks very different.

Rclone
drive_id = b!6358GmXXH-E-fXZCT0OWdcHigEdNhIipEqh45d_MCdoLJhT6ToLJhTKV1EMWqQjF

Sharepoint
Site ID: e017a3e8-c7f5-2bb4-8613-37fae9b31d53

I've tried varous ways to get the b!635-like drive ID by using Powershell sharepoint tools. But they all look like the e017a-like ID.

FYI: These ID's are fictional, not used in any production environment

Rclone gets that ID using the Microsoft Graph API. I think this is how it works

It looks like if you can figure out how to read the drive_id you will be all set :crossed_fingers:

Allrighty, I have tried a xcouple different things but the outcome hasn't been what I was looking for.
I don't mind doing some manual linking of remotes. But is there a way I dont have to press 1, 31, 1, 2 etc in the config process?
I have tried variations like
rclone config create thijstest2 onedrive --onedrive-drive-type documentLibrary https://blabla.sharepoint.com/sites/thijstest2
rclone config create thijstest2 onedrive --onedrive-drive-type "documentLibrary"
rclone config create thijstest2 onedrive url https://blabla.sharepoint.com/sites/thijstest2/Shared20%Documents

It does go through the authentication process and it adds something to my config file but it's using drive_type business instead of documentLibrary. I've been at this for quite some hours and I'm stuck...
Also I would love to add the URL for each site since most of the sites are in UUID format coming from our CRM.

Once I find the correct command to add a documentLibrary, I can write a script that goes through a nice CSV, adding the whole bunch

Do you have some pointers..? Kindy appreciated!

Bytheway: when I manually go through the ncurses type setup, I do the steps below. And they work like a charm. If I can find a way to do these manual steps by creating 1 line, I can automate it...

Enter name for new remote.
name> thijstest1

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
31 / Microsoft OneDrive
   \ (onedrive)


Storage> 31

Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id>

Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret>

Option region.
Choose national cloud region for OneDrive.
Choose a number from below, or type in your own string value.
Press Enter for the default (global).
 1 / Microsoft Cloud Global
   \ (global)
 2 / Microsoft Cloud for US Government
   \ (us)
 3 / Microsoft Cloud Germany
   \ (de)
 4 / Azure and Office 365 operated by Vnet Group in China
   \ (cn)
region> 1

Edit advanced config?
y) Yes
n) No (default)
y/n> n

Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n> y

2023/09/12 19:40:30 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=o
2023/09/12 19:40:30 NOTICE: Log in and authorize rclone for access
2023/09/12 19:40:30 NOTICE: Waiting for code...
2023/09/12 19:40:32 NOTICE: Got code
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
 1 / OneDrive Personal or Business
   \ (onedrive)
 2 / Root Sharepoint site
   \ (sharepoint)
   / Sharepoint site name or URL
 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
   \ (url)
 4 / Search for a Sharepoint site
   \ (search)
 5 / Type in driveID (advanced)
   \ (driveid)
 6 / Type in SiteID (advanced)
   \ (siteid)
   / Sharepoint server-relative path (advanced)
 7 | E.g. /teams/hr
   \ (path)
config_type> 3

Option config_site_url.
Site URL
Example: "https://contoso.sharepoint.com/sites/mysite" or "mysite"
Enter a value.
config_site_url> https://blabla.sharepoint.com/sites/thijstest1

Option config_driveid.
Select drive you want to use
Choose a number from below, or type in your own string value.
Press Enter for the default (b!).
 1 / Documents (documentLibrary)
   \ (b!)
config_driveid> 1

Drive OK?

Found drive "root" of type "documentLibrary"
URL: https://blabla.sharepoint.com/sites/thijstest1/Shared%20Documents

y) Yes (default)
n) No
y/n> y

Configuration complete.
Options:
- type: onedrive
- token: {"access_token":"}
- drive_id: b!
- drive_type: documentLibrary
Keep this "thijstest1" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y

sorry to jump in, but is that the only problem?
if so, should be a number of workarounds.

not sure if this is relevant, i used autoexpect

I’ve tried to change the drive type in the config file after adding the remote. But that didn’t make it magically work. I think it’s adding the user’s onedrive for business folder instead of the sharepoint folder that I specify with the url option.

But indeed the only issue is finding the correct full command.

I’ll look at your other tip in the morning. I’m in EU tz😁

ok. just wanted to make sure you tried that.

perhaps sharepoint over webdav:
https://rclone.org/webdav/#sharepoint-online

Whenever you see an option like this you can pass in to config create as

rclone config create ... config_site_url=value

Hopefully that helps automate some of the questions

mmm still no joy.
What is the flag I need to create it as a sharepoint folder? It seems to really want to create a OneDrive business target

I think you need this. I got these names from the config transcript above.

config_type=url
config_site_url=https://blabla.sharepoint.com/sites/thijstest1

Putting it all together

rclone config create thijstest2 onedrive config_type=url config_site_url=https://blabla.sharepoint.com/sites/thijstest1

I hope that helps.

OWYEAH!!! I can't believe it! it works! I don't understand why I haven't run this perticular order. IM OVER THE MOON! Thanks!!!

1 Like

Ugh.. the saga continues... it's different when the shared document library is stored at https://blabla.sharepoint.com/teams/43425435n2o2j4oij42o5ij42o5ij425oi2

When I use the full command @ncw posted above, it's throwing loads of errors Failed to query available site by relative path: HTTP error 404 (404 Not Found)
So tinkering on

So in the ncurses app i do


PS C:\Users\Thijs\blabla\it - Documents\migratie ARC\scripts_csv> rclone config
Current remotes:

Name                 Type
====                 ====
google               drive
thijstest1           onedrive
thijstestarchive     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

Enter name for new remote.
name> teamstest

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
31 / Microsoft OneDrive
   \ (onedrive)

Storage> 31

Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id>

Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret>

Option region.
Choose national cloud region for OneDrive.
Choose a number from below, or type in your own string value.
Press Enter for the default (global).
 1 / Microsoft Cloud Global
   \ (global)
 2 / Microsoft Cloud for US Government
   \ (us)
 3 / Microsoft Cloud Germany
   \ (de)
 4 / Azure and Office 365 operated by Vnet Group in China
   \ (cn)
region>

Edit advanced config?
y) Yes
n) No (default)
y/n>

Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n>

2023/09/13 19:06:24 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=pk2
2023/09/13 19:06:24 NOTICE: Log in and authorize rclone for access
2023/09/13 19:06:24 NOTICE: Waiting for code...
2023/09/13 19:06:26 NOTICE: Got code
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
 1 / OneDrive Personal or Business
   \ (onedrive)
 2 / Root Sharepoint site
   \ (sharepoint)
   / Sharepoint site name or URL
 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
   \ (url)
 4 / Search for a Sharepoint site
   \ (search)
 5 / Type in driveID (advanced)
   \ (driveid)
 6 / Type in SiteID (advanced)
   \ (siteid)
   / Sharepoint server-relative path (advanced)
 7 | E.g. /teams/hr
   \ (path)
config_type> 7

Option config_sharepoint_url.
Server-relative URL
Enter a value.
config_sharepoint_url> /teams/redcacted

Option config_driveid.
Select drive you want to use
Choose a number from below, or type in your own string value.
Press Enter for the default (b!redact).
 1 / Documents (documentLibrary)
   \ (b!redact)
config_driveid>

Drive OK?

Found drive "root" of type "documentLibrary"
URL: https://blablanl.sharepoint.com/teams/redacted/Shared%20Documents

y) Yes (default)
n) No
y/n>

Configuration complete.
Options:
- type: onedrive
- token: {"access_token":"redacted"}
- drive_id: b!1jNredacted
- drive_type: documentLibrary
Keep this "teamstest" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>

Current remotes:

Name                 Type
====                 ====
google               drive
teamstest            onedrive
thijstest1           onedrive
thijstestarchive     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> q

So I thought
rclone config create teamstest2 onedrive config_type=url config_sharepoint_url=/teams/redacted
or
rclone config create teamstest2 onedrive config_type=url config_driveid=/teams/redacted
or
rclone config create teamstest2 onedrive config_type=url path=/teams/redacted
or
rclone config create teamstest2 onedrive config_type=url config_sharepoint_url=https://blabla.sharepoint.com config_driveid=/teams/redacted
but no...

This indicates that this should be correct.

Are you saying that gives

? Does it do that with the interactive configurator?

To see what is going on with the rclone config create command add -vv to it and post the output here.

The interactive configurator goes fine. The single command doesn't.

This is the output of -vv with the interactive configurator.

PS C:\Users\Thijs\redacted\it - Documents\migratie ARC\scripts_csv> rclone config -vv --dump bodies
2023/09/13 21:04:51 DEBUG : rclone: Version "v1.64.0" starting with parameters ["C:\\Users\\Thijs\\AppData\\Local\\Microsoft\\WinGet\\Packages\\Rclone.Rclone_Microsoft.Winget.Source_8wekyb3d8bbwe\\rclone-v1.64.0-windows-amd64\\rclone.exe" "config" "-vv" "--dump" "bodies"]
2023/09/13 21:04:51 DEBUG : Using config file from "C:\\Users\\Thijs\\AppData\\Roaming\\rclone\\rclone.conf"
Current remotes:

Name                 Type
====                 ====
google               drive
thijstest1           onedrive
thijstestarchive     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

Enter name for new remote.
name> teamstest

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
 
31 / Microsoft OneDrive
   \ (onedrive)
3
Storage> 31

2023/09/13 21:04:59 DEBUG : teamstest: config in: state="*all", result=""
2023/09/13 21:04:59 DEBUG : teamstest: config out: out=&{State:*all-set,0,false Option: OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:04:59 DEBUG : teamstest: config: reading config parameter "client_id"
Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id>

2023/09/13 21:05:00 DEBUG : teamstest: config in: state="*all-set,0,false", result=""
2023/09/13 21:05:00 DEBUG : teamstest: config out: out=&{State:*all,1,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:00 DEBUG : teamstest: config in: state="*all,1,false", result=""
2023/09/13 21:05:00 DEBUG : teamstest: config out: out=&{State:*all-set,1,false Option: OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:00 DEBUG : teamstest: config: reading config parameter "client_secret"
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret>

2023/09/13 21:05:00 DEBUG : teamstest: config in: state="*all-set,1,false", result=""
2023/09/13 21:05:00 DEBUG : teamstest: config out: out=&{State:*all,2,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:00 DEBUG : teamstest: config in: state="*all,2,false", result=""
2023/09/13 21:05:00 DEBUG : teamstest: config out: out=&{State:*all,3,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:00 DEBUG : teamstest: config in: state="*all,3,false", result=""
2023/09/13 21:05:00 DEBUG : teamstest: config out: out=&{State:*all,4,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:00 DEBUG : teamstest: config in: state="*all,4,false", result=""
2023/09/13 21:05:00 DEBUG : teamstest: config out: out=&{State:*all,5,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:00 DEBUG : teamstest: config in: state="*all,5,false", result=""
2023/09/13 21:05:00 DEBUG : teamstest: config out: out=&{State:*all-set,5,false Option:global OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:00 DEBUG : teamstest: config: reading config parameter "region"
Option region.
Choose national cloud region for OneDrive.
Choose a number from below, or type in your own string value.
Press Enter for the default (global).
 1 / Microsoft Cloud Global
   \ (global)
 2 / Microsoft Cloud for US Government
   \ (us)
 3 / Microsoft Cloud Germany
   \ (de)
 4 / Azure and Office 365 operated by Vnet Group in China
   \ (cn)
region>

2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all-set,5,false", result="global"
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,6,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,6,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,7,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,7,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,8,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,8,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,9,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,9,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,10,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,10,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,11,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,11,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,12,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,12,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,13,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,13,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,14,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,14,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,15,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,15,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,16,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,16,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,17,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,17,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,18,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,18,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,19,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,19,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,20,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,20,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,21,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,21,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all,22,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config in: state="*all,22,false", result=""
2023/09/13 21:05:01 DEBUG : teamstest: config out: out=&{State:*all-advanced Option:false OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:01 DEBUG : teamstest: config: reading config parameter "config_fs_advanced"
Edit advanced config?
y) Yes
n) No (default)
y/n>

2023/09/13 21:05:02 DEBUG : teamstest: config in: state="*all-advanced", result="false"
2023/09/13 21:05:02 DEBUG : teamstest: config out: out=&{State:*postconfig Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:02 DEBUG : teamstest: config in: state="*postconfig", result=""
2023/09/13 21:05:02 DEBUG : teamstest: config in: state="", result=""
2023/09/13 21:05:02 DEBUG : teamstest: config out: out=&{State:*oauth,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:02 DEBUG : teamstest: config out: out=&{State:*oauth,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:02 DEBUG : teamstest: config in: state="*oauth,choose_type,,", result=""
2023/09/13 21:05:02 DEBUG : teamstest: config out: out=&{State:*oauth-confirm,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:02 DEBUG : teamstest: config in: state="*oauth-confirm,choose_type,,", result=""
2023/09/13 21:05:02 DEBUG : teamstest: config out: out=&{State:*oauth-islocal,choose_type,, Option:true OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:02 DEBUG : teamstest: config: reading config parameter "config_is_local"
Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n>

2023/09/13 21:05:03 DEBUG : teamstest: config in: state="*oauth-islocal,choose_type,,", result="true"
2023/09/13 21:05:03 DEBUG : teamstest: config out: out=&{State:*oauth-do,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:03 DEBUG : teamstest: config in: state="*oauth-do,choose_type,,", result=""
2023/09/13 21:05:03 DEBUG : Starting auth server on 127.0.0.1:53682
2023/09/13 21:05:03 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=redacted
2023/09/13 21:05:03 NOTICE: Log in and authorize rclone for access
2023/09/13 21:05:03 NOTICE: Waiting for code...
2023/09/13 21:05:03 DEBUG : Redirecting browser to: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?access_type=offline&client_id=redactedresponse_type=code&scope=Files.Read+Files.ReadWrite+Files.Read.All+Files.ReadWrite.All+Sites.Read.All+offline_access&state=redacted
2023/09/13 21:05:05 DEBUG : Received GET request on auth server to "/"
2023/09/13 21:05:05 NOTICE: Got code
2023/09/13 21:05:05 DEBUG : Closing auth server
2023/09/13 21:05:05 DEBUG : Closed auth server with error: accept tcp 127.0.0.1:53682: use of closed network connection
2023/09/13 21:05:05 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2023/09/13 21:05:05 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/13 21:05:05 DEBUG : HTTP REQUEST (req 0xc0001ffd00)
2023/09/13 21:05:05 DEBUG : POST /common/oauth2/v2.0/token HTTP/1.1
Host: login.microsoftonline.com
User-Agent: rclone/v1.64.0
Content-Length: 903
Authorization: XXXX
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

code=redacted
2023/09/13 21:05:05 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/13 21:05:05 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/13 21:05:05 DEBUG : HTTP RESPONSE (req 0xc0001ffd00)
2023/09/13 21:05:05 DEBUG : HTTP/1.1 200 OK
Content-Length: 3289
Cache-Control: no-store, no-cache
Content-Type: application/json; charset=utf-8
Date: Wed, 13 Sep 2023 19:05:06 GMT
Expires: -1
P3p: CP="DSP CUR OTPi IND OTRi ONL FIN"
Pragma: no-cache
Set-Cookie: fpc=Aredacted; expires=Fri, 13-Oct-2023 19:05:06 GMT; path=/; secure; HttpOnly; SameSite=None
Set-Cookie: x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly
Set-Cookie: stsservicecookie=estsfd; path=/; secure; samesite=none; httponly
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Ms-Ests-Server: 2.1.16253.5 - FRC ProdSlices
X-Ms-Request-Id: 6955f1a5-76a1-4d6d-9ddc-0370dec6aa00
X-Xss-Protection: 0

{"token_type":"Bearer","scope":"Files.Read Files.Read.All Files.ReadWrite Files.ReadWrite.All Sites.Read.All profile openid email","expires_in":4714,"ext_expires_in":4714,"access_token":"redactedf"}
2023/09/13 21:05:05 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/13 21:05:05 DEBUG : Saving config "token" in section "teamstest" of the config file
2023/09/13 21:05:05 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2023/09/13 21:05:05 DEBUG : teamstest: Saved new token in config file
2023/09/13 21:05:05 DEBUG : teamstest: config out: out=&{State:*oauth-done,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:05 DEBUG : teamstest: config in: state="*oauth-done,choose_type,,", result=""
2023/09/13 21:05:05 DEBUG : teamstest: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:05 DEBUG : teamstest: config in: state="choose_type", result=""
2023/09/13 21:05:05 DEBUG : teamstest: config out: out=&{State:choose_type_done Option:onedrive OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:05 DEBUG : teamstest: config: reading config parameter "config_type"
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
 1 / OneDrive Personal or Business
   \ (onedrive)
 2 / Root Sharepoint site
   \ (sharepoint)
   / Sharepoint site name or URL
 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
   \ (url)
 4 / Search for a Sharepoint site
   \ (search)
 5 / Type in driveID (advanced)
   \ (driveid)
 6 / Type in SiteID (advanced)
   \ (siteid)
   / Sharepoint server-relative path (advanced)
 7 | E.g. /teams/hr
   \ (path)
config_type> 7

2023/09/13 21:05:07 DEBUG : teamstest: config in: state="choose_type_done", result="path"
2023/09/13 21:05:07 DEBUG : teamstest: config out: out=&{State:path Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:07 DEBUG : teamstest: config in: state="path", result=""
2023/09/13 21:05:07 DEBUG : teamstest: config out: out=&{State:path_end Option: OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:07 DEBUG : teamstest: config: reading config parameter "config_sharepoint_url"
Option config_sharepoint_url.
Server-relative URL
Enter a value.
config_sharepoint_url> /teams/redactedf

2023/09/13 21:05:30 DEBUG : teamstest: config in: state="path_end", result="/teams/redacted"
2023/09/13 21:05:30 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/13 21:05:30 DEBUG : HTTP REQUEST (req 0xc000a92100)
2023/09/13 21:05:30 DEBUG : GET /v1.0/sites/root:/teams/redacted HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.64.0
Authorization: XXXX
Accept-Encoding: gzip

2023/09/13 21:05:30 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/13 21:05:30 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/13 21:05:30 DEBUG : HTTP RESPONSE (req 0xc000a92100)
2023/09/13 21:05:30 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: no-store, no-cache
Client-Request-Id: 086a5f3f-1af1-4e1d-87d4-99517884ca58
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Date: Wed, 13 Sep 2023 19:05:31 GMT
Odata-Version: 4.0
Request-Id: 086a5f3f-1af1-4e1d-87d4-99517884ca58
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"AM1PEPF000105A5"}}

211
{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#sites/$entity","createdDateTime":"2020-02-03T14:01:42.027Z","description":"","id":"redactednl.sharepoint.com,8a7ae0c5-7338-4257-b3a8-f6c08f369e15,38123ead-933e-4596-9359-d2f673c1c644","lastModifiedDateTime":"2023-09-13T18:58:48Z","name":"redacted","webUrl":"https://redactednl.sharepoint.com/teams/redacted","displayName":"redacted-SLA 2020 - deel 1","root":{},"siteCollection":{"hostname":"redactednl.sharepoint.com"}}
0

2023/09/13 21:05:30 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/13 21:05:30 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/13 21:05:30 DEBUG : HTTP REQUEST (req 0xc000a92500)
2023/09/13 21:05:30 DEBUG : GET /v1.0/sites/redactednl.sharepoint.com,redacted-7338-4257-b3a8-redacted,redacted-933e-4596-9359-redacted/drives HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.64.0
Authorization: XXXX
Accept-Encoding: gzip

2023/09/13 21:05:30 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/13 21:05:30 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/13 21:05:30 DEBUG : HTTP RESPONSE (req 0xc000a92500)
2023/09/13 21:05:30 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: no-store, no-cache
Client-Request-Id: redacted-0a8c-4844-b5b4-redacted
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Date: Wed, 13 Sep 2023 19:05:31 GMT
Odata-Version: 4.0
Request-Id: redacted-0a8c-4844-b5b4-redacted
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"AM1PEPF000105A5"}}

23d
{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives","value":[{"createdDateTime":"2020-02-02T05:29:40Z","description":"","id":"b!xeredactedqTS","lastModifiedDateTime":"2020-05-15T11:08:26Z","name":"Documents","webUrl":"https://redactednl.sharepoint.com/teams/redacted/Shared%20Documents","driveType":"documentLibrary","createdBy":{"user":{"displayName":"System Account"}},"quota":{"deleted":0,"remaining":27482993160070,"state":"normal","total":27487790694400,"used":4797534330}}]}
0

2023/09/13 21:05:30 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/13 21:05:30 DEBUG : teamstest: config out: out=&{State:driveid_final Option:b!xeB6ijhzV0KredactedTS OAuth:<nil> Error: Result:}, err=<nil>       
2023/09/13 21:05:30 DEBUG : teamstest: config: reading config parameter "config_driveid"
Option config_driveid.
Select drive you want to use
Choose a number from below, or type in your own string value.
Press Enter for the default (b!xredactedgqTS).
 1 / Documents (documentLibrary)
   \ (b!xeB6redacted)
config_driveid> 1

2023/09/13 21:05:37 DEBUG : teamstest: config in: state="driveid_final", result="b!redactedS"
2023/09/13 21:05:37 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/13 21:05:37 DEBUG : HTTP REQUEST (req 0xc000a92800)
2023/09/13 21:05:37 DEBUG : GET /v1.0/drives/b!xeredacted/root HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.64.0
Authorization: XXXX
Accept-Encoding: gzip

2023/09/13 21:05:37 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/13 21:05:37 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/13 21:05:37 DEBUG : HTTP RESPONSE (req 0xc000a92800)
2023/09/13 21:05:37 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: no-store, no-cache
Client-Request-Id: redacted-09cf-4587-87b0-redacted
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Date: Wed, 13 Sep 2023 19:05:37 GMT
Odata-Version: 4.0
Request-Id: redacted-09cf-4587-87b0-redacted
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"AM1PEPF000105A5"}}

2b2
{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives('b%redactedTS')/root/$entity","createdDateTime":"2020-02-02T05:29:40Z","id":"0redactedZ","lastModifiedDateTime":"2023-09-11T07:25:14Z","name":"root","webUrl":"https://redactednl.sharepoint.com/teams/5redacted/Shared%20Documents","size":3195645508,"parentReference":{"driveType":"documentLibrary","driveId":"b!redactedLgqTS"},"fileSystemInfo":{"createdDateTime":"2020-02-02T05:29:40Z","lastModifiedDateTime":"2023-09-11T07:25:14Z"},"folder":{"childCount":8},"root":{}}
0

2023/09/13 21:05:37 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/13 21:05:37 DEBUG : Saving config "drive_id" in section "teamstest" of the config file
2023/09/13 21:05:37 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2023/09/13 21:05:37 DEBUG : Saving config "drive_type" in section "teamstest" of the config file
2023/09/13 21:05:37 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2023/09/13 21:05:37 DEBUG : teamstest: config out: out=&{State:driveid_final_end Option:true OAuth:<nil> Error: Result:}, err=<nil>
2023/09/13 21:05:37 DEBUG : teamstest: config: reading config parameter "config_drive_ok"
Drive OK?

Found drive "root" of type "documentLibrary"
URL: https://redactednl.sharepoint.com/teams/redacted/Shared%20Documents

y) Yes (default)
n) No
y/n>

2023/09/13 21:06:14 DEBUG : teamstest: config in: state="driveid_final_end", result="true"
2023/09/13 21:06:14 DEBUG : teamstest: config out: out=<nil>, err=<nil>
2023/09/13 21:06:14 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
Configuration complete.
Options:
- type: onedrive
- token: {"access_token":"redacted"}
- drive_id: b!redacted
- drive_type: documentLibrary
Keep this "teamstest" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>
2023/09/13 21:06:16 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-

which I haven't been able to reproduce with a single command.

I note that you chose config_type=path above not URL like you did previously?

So that looks like the problem. Use config_type=path config_sharepoint_url=teams/redacted

If it doesn't work post the output with -vv

I tried with the flags you've suggested, for some reason the interactive configurator finds the root URL, the single command doesnt. The error you see is repeated indefinately until I ctrl-c the command.

output of rclone config create teamstest onedrive config_type=path config_sharepoint_url=teams/redacted -vv --dump bodies

PS C:\Users\Thijs\redacted\it - Documents\migratie redacted\scripts_csv> . 'C:\Users\Thijs\redacted\it - Documents\migratie redacted\scripts_csv\RC_create_remotes.ps1'
2023/09/18 12:19:15 DEBUG : rclone: Version "v1.64.0" starting with parameters ["C:\\Users\\Thijs\\AppData\\Local\\Microsoft\\WinGet\\Packages\\Rclone.Rclone_Microsoft.Winget.Source_8wekyb3d8bbwe\\rclone-v1.64.0-windows-amd64\\rclone.exe" "config" "create" "teamstest" "onedrive" "config_type=path" "config_sharepoint_url=teams/redacted/" "-vv" "--dump" "bodies"]
2023/09/18 12:19:15 DEBUG : Using config file from "C:\\Users\\Thijs\\AppData\\Roaming\\rclone\\rclone.conf"
2023/09/18 12:19:15 DEBUG : teamstest: config in: state="", result=""
2023/09/18 12:19:15 DEBUG : teamstest: config out: out=&{State:*oauth,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:19:15 DEBUG : teamstest: config in: state="*oauth,choose_type,,", result=""
2023/09/18 12:19:15 DEBUG : teamstest: config out: out=&{State:*oauth-confirm,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:19:15 DEBUG : teamstest: config in: state="*oauth-confirm,choose_type,,", result=""
2023/09/18 12:19:15 DEBUG : Auto confirm is set, choosing default "true" for state "*oauth-islocal,choose_type,,", override by setting config parameter "config_is_local"
2023/09/18 12:19:15 DEBUG : teamstest: config out: out=&{State:*oauth-islocal,choose_type,, Option:<nil> OAuth:<nil> Error: Result:true}, err=<nil>
2023/09/18 12:19:15 DEBUG : teamstest: config in: state="*oauth-islocal,choose_type,,", result="true"
2023/09/18 12:19:15 DEBUG : teamstest: config out: out=&{State:*oauth-do,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:19:15 DEBUG : teamstest: config in: state="*oauth-do,choose_type,,", result=""
2023/09/18 12:19:15 DEBUG : Starting auth server on 127.0.0.1:53682
2023/09/18 12:19:15 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=4TBu-Djy_nInjIS9vQ_mmQ
2023/09/18 12:19:15 NOTICE: Log in and authorize rclone for access
2023/09/18 12:19:15 NOTICE: Waiting for code...
2023/09/18 12:19:15 DEBUG : Redirecting browser to: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?access_type=offline&client_id=redactedDjy_nInjIS9vQ_mmQ
2023/09/18 12:19:20 DEBUG : Received GET request on auth server to "/"
2023/09/18 12:19:20 NOTICE: Got code
2023/09/18 12:19:20 DEBUG : Closing auth server
2023/09/18 12:19:20 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2023/09/18 12:19:20 DEBUG : Closed auth server with error: accept tcp 127.0.0.1:53682: use of closed network connection
2023/09/18 12:19:20 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/18 12:19:20 DEBUG : HTTP REQUEST (req 0xc000938b00)
2023/09/18 12:19:20 DEBUG : POST /common/oauth2/v2.0/token HTTP/1.1
Host: login.microsoftonline.com
User-Agent: rclone/v1.64.0
Content-Length: 904
Authorization: XXXX
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

code=redacted
2023/09/18 12:19:20 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/18 12:19:20 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/18 12:19:20 DEBUG : HTTP RESPONSE (req 0xc000938b00)
2023/09/18 12:19:20 DEBUG : HTTP/1.1 200 OK
Content-Length: 3295
Cache-Control: no-store, no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 18 Sep 2023 10:19:19 GMT
Expires: -1
P3p: CP="DSP CUR OTPi IND OTRi ONL FIN"
Pragma: no-cache
Set-Cookie: fpc=ApqfhyGjxoJNh3qll5vKmyPz27gSAQAAACcbmtwOAAAA; expires=Wed, 18-Oct-2023 10:19:20 GMT; path=/; secure; HttpOnly; SameSite=None
Set-Cookie: x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly
Set-Cookie: stsservicecookie=estsfd; path=/; secure; samesite=none; httponly
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Ms-Ests-Server: 2.1.16314.5 - SEC ProdSlices
X-Ms-Request-Id: b7cb5702-b170-495e-90c6-1b9062f27a00
X-Xss-Protection: 0

{"token_type":"Bearer","scope":"Files.Read Files.Read.All Files.ReadWrite Files.ReadWrite.All Sites.Read.All profile openid email","expires_in":4708,"ext_expires_in":4708,"access_token":"eyJ0eXAiOiJKV1QiLCJub25jZSI6IjItQWs0UzlhUmZBbzVxWXlvc193eGVnaHpPSkctY2duTVpoQ0hkeXJOZlEiLCJhbGciOiJSUzI1NiIsIng1dCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyIsImtpZCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTAwMDAtYzAwMC0wMDAwMDAwMDAwMDAiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8yMjNkZThjMS1iMDMwLTRmZjAtOWU2ZS00ODYwNWM2NDI2YmEvIiwiaWF0IjoxNjk1MDMyMDYwLCJuYmYiOjE2OTUwMzIwNjAsImV4cCI6MTY5NTAzNzA2OSwiYWNjdCI6MCwiYWNyIjoiMSIsImFpbyI6IkFUUUF5LzhVQUFBQXYyVnYrR0t2NlplMVJIanJidlN5dk1HS3VDZkNVTGJhR2QzZThWSHdhelpGZUlDTnNoV1lGcXJNR3YvN09KbXIiLCJhbXIiOlsicHdkIl0sImFwcF9kaXNwbGF5bmFtZSI6InJjbG9uZSIsImFwcGlkIjoiYjE1NjY1ZDktZWRhNi00MDkyLTg1MzktMGVlYzM3NmFmZDU5IiwiYXBwaWRhY3IiOiIxIiwiZ2l2ZW5fbmFtZSI6IjM2NXRoaWpzIiwiaWR0eXAiOiJ1c2VyIiwiaXBhZGRyIjoiODEuMjEuMTM4LjE4OSIsIm5hbWUiOiIzNjV0aGlqcyIsIm9pZCI6ImE2MWE5ZWZlLTdjMWYtNGVkNS1hZDIyLTMwZjU0YmE4ZTZmNyIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS03MzQxNjgwNTMtNTExOTUwNDQ4LTM0NTU2MTgwMTItMTY1NzEiLCJwbGF0ZiI6IjMiLCJwdWlkIjoiMTAwMzIwMDE4QTY3QjM4QiIsInJoIjoiMC5BVndBd2VnOUlqQ3c4RS1lYmtoZ1hHUW11Z01BQUFBQUFBQUF3QUFBQUFBQUFBQmNBRUEuIiwic2NwIjoiRmlsZXMuUmVhZCBGaWxlcy5SZWFkLkFsbCBGaWxlcy5SZWFkV3JpdGUgRmlsZXMuUmVhZFdyaXRlLkFsbCBTaXRlcy5SZWFkLkFsbCBwcm9maWxlIG9wZW5pZCBlbWFpbCIsInNpZ25pbl9zdGF0ZSI6WyJrbXNpIl0sInN1YiI6ImRvU1Y4blRuaG1HZG5hQWkzZDRrMW93QTVDWmFIa2c4dFpNekpkako3Z00iLCJ0ZW5hbnRfcmVnaW9uX3Njb3BlIjoiRVUiLCJ0aWQiOiIyMjNkZThjMS1iMDMwLTRmZjAtOWU2ZS00ODYwNWM2NDI2YmEiLCJ1bmlxdWVfbmFtZSI6IjM2NXRoaWpzQGZhYnJpcXVlLm5sIiwidXBuIjoiMzY1dGhpanNAZmFicmlxdWUubmwiLCJ1dGkiOiJBbGZMdDNDeFhrbVF4aHVRWXZKNkFBIiwidmVyIjoiMS4wIiwid2lkcyI6WyJmMjhhMWY1MC1mNmU3LTQ1NzEtODE4Yi02YTEyZjJhZjZiNmMiLCJiMGY1NDY2MS0yZDc0LTRjNTAtYWZhMy0xZWM4MDNmMTJlZmUiLCI2MmU5MDM5NC02OWY1LTQyMzctOTE5MC0wMTIxNzcxNDVlMTAiLCJiNzlmYmY0ZC0zZWY5LTQ2ODktODE0My03NmIxOTRlODU1MDkiXSwieG1zX3N0Ijp7InN1YiI6ImtGTW9pNXB2bnEtQVduRHk4ZjE4RkVHQ3hHOExLdERpbEJGSjNvYnU3UVEifSwieG1zX3RjZHQiOjE0NjU4OTQ3NjgsInhtc190ZGJyIjoiRVUifQ.PqX_Kfr8pnv6klcO_nj4I3_DA7BlCQtrpOePEIL_hxS9Dqd_f7sp50BG4lIZVUqeKooHWKjlUlu9hYuKG17KSCF2BzUXRO4wTYUDKzOvCwFZ2aZ4PghWK-HHhdgJUZ1_wofvikKlH9jH7Zk2ieFc-Ij-CXFrJVzCQGbJxHSrHx7cwzSVOsvIw-Oq3sT3ZaEks_FEkxzU0N4oUtNiRQys7iMhl834Q7wRsZTLMCxhM6YRmF_dVaHyDLbGgNOJnPTSGW8MB_EkFfnqW1PMTtaK8uVQtr3FyMOuF2SyAPEQEayX-Slhe0Ip4VJ_aE2OLsOu-W4nxbznpLZpMVVkQ_uG_w","refresh_token":"0.AVwAweg9IjCw8E-ebkhgXGQmutllVrGm7ZJAhTkO7Ddq_VlcAEA.AgABAAEAAAAtyolDObpQQ5VtlI4uGjEPAgDs_wUA9P-7XVnVL31IzCBZyt_rw48332w_xN7jDCly18uhKWuILh7gOdZ9UNtcLS_dig0-azjsAXemMJnrn2rIiiQ-lcj-ajiHKTG4Pxv9mB4I8lsgc2gt5OBZiaUCtnZzvdqgkzl3EKxodbiWjTsHgU8wLsvnwMFkibF9eLCDfyjA2ooCVXmEbOajmyqMsrP1wT3kj53k_GIpojByrTCGTuPVaDPsv0C3tfrAsn3dEXrbaPJpldtrzzQfN27HD-173MyR2PTygYgkjoMMvNr0A1nya9zP9HsA4sewtwFywY9_3D1N0ZF0IrikOeYLXqrpGRawyGihMZfE-kgIcChU8qg5GQLHvTO3KpAnyasTNDsGOaWKkAyLa3LDMMOg02AA6tHypL6cVKmByeprsNvtxyLc4arK5DjJywfByIpUyVLt16vJZ-7FwWEMHzz3-Z8oCsmFh3XO_3tEqTkSbT8OWiaD0ZBQprcA7zrdaV_bo9litVYamcrEWL84vuCKFf5-kYr44SMRtwTswmyuJtvz0Ki0j8vECMDRXHDIGRxG7pbM8XpxH7ojcSLoU7sbxmP_zeC8Ia90-UKpa-STIyilbk1DXhwcclC2Q7__3kcjwx_gfRy_JbLE-yH5D6SBj42jvoS-biqkHZPzd74i-pvpJedQoaFm-dMkm_DNWqcsYL6tygPW9eHpcVen-XeCIa5UJuZIklhvzWP_NPE1svJMs98"}
2023/09/18 12:19:20 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/18 12:19:20 DEBUG : Saving config "token" in section "teamstest" of the config file
2023/09/18 12:19:20 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2023/09/18 12:19:20 DEBUG : teamstest: Saved new token in config file
2023/09/18 12:19:20 DEBUG : teamstest: config out: out=&{State:*oauth-done,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:19:20 DEBUG : teamstest: config in: state="*oauth-done,choose_type,,", result=""
2023/09/18 12:19:20 DEBUG : teamstest: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:19:20 DEBUG : teamstest: config in: state="choose_type", result=""
2023/09/18 12:19:20 DEBUG : Override value found, choosing value "path" for state "choose_type_done"
2023/09/18 12:19:20 DEBUG : teamstest: config out: out=&{State:choose_type_done Option:<nil> OAuth:<nil> Error: Result:path}, err=<nil>
2023/09/18 12:19:20 DEBUG : teamstest: config in: state="choose_type_done", result="path"
2023/09/18 12:19:20 DEBUG : teamstest: config out: out=&{State:path Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:19:20 DEBUG : teamstest: config in: state="path", result=""
2023/09/18 12:19:20 DEBUG : Override value found, choosing value "teams/redacted/" for state "path_end"
2023/09/18 12:19:20 DEBUG : teamstest: config out: out=&{State:path_end Option:<nil> OAuth:<nil> Error: Result:teams/redacted/}, err=<nil>
2023/09/18 12:19:20 DEBUG : teamstest: config in: state="path_end", result="teams/redacted/"
2023/09/18 12:19:20 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/18 12:19:20 DEBUG : HTTP REQUEST (req 0xc000938200)
2023/09/18 12:19:20 DEBUG : GET /v1.0/sites/root:teams/redacted/ HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.64.0
Authorization: XXXX
Accept-Encoding: gzip

2023/09/18 12:19:20 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/18 12:19:20 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/18 12:19:20 DEBUG : HTTP RESPONSE (req 0xc000938200)
2023/09/18 12:19:20 DEBUG : HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Client-Request-Id: 1697a05f-f875-40a1-8af5-8159f0b81ce7
Content-Type: application/json
Date: Mon, 18 Sep 2023 10:19:20 GMT
Request-Id: 1697a05f-f875-40a1-8af5-8159f0b81ce7
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"008","RoleInstance":"AM2PEPF0001C9F2"}}

10d
{"error":{"code":"BadRequest","message":"Resource not found for the segment 'redacted'.","innerError":{"date":"2023-09-18T10:19:20","request-id":"1697a05f-f875-40a1-8af5-8159f0b81ce7","client-request-id":"1697a05f-f875-40a1-8af5-8159f0b81ce7"}}}
0

2023/09/18 12:19:20 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/18 12:19:20 DEBUG : teamstest: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error:Failed to query available site by relative path: HTTP error 400 (400 Bad Request) returned body: "{\"error\":{\"code\":\"BadRequest\",\"message\":\"Resource not found for the segment 'redacted'.\",\"innerError\":{\"date\":\"2023-09-18T10:19:20\",\"request-id\":\"1697a05f-f875-40a1-8af5-8159f0b81ce7\",\"client-request-id\":\"1697a05f-f875-40a1-8af5-8159f0b81ce7\"}}}" Result:}, err=<nil>
Failed to query available site by relative path: HTTP error 400 (400 Bad Request) returned body: "{\"error\":{\"code\":\"BadRequest\",\"message\":\"Resource not found for the segment 'redacted'.\",\"innerError\":{\"date\":\"2023-09-18T10:19:20\",\"request-id\":\"1697a05f-f875-40a1-8af5-8159f0b81ce7\",\"client-request-id\":\"1697a05f-f875-40a1-8af5-8159f0b81ce7\"}}}"

2023/09/18 12:19:20 DEBUG : teamstest: config in: state="choose_type", result=""
2023/09/18 12:19:20 DEBUG : Override value found, choosing value "path" for state "choose_type_done"
2023/09/18 12:19:20 DEBUG : teamstest: config out: out=&{State:choose_type_done Option:<nil> OAuth:<nil> Error: Result:path}, err=<nil>
2023/09/18 12:19:20 DEBUG : teamstest: config in: state="choose_type_done", result="path"
2023/09/18 12:19:20 DEBUG : teamstest: config out: out=&{State:path Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:19:20 DEBUG : teamstest: config in: state="path", result=""
2023/09/18 12:19:20 DEBUG : Override value found, choosing value "teams/redacted/" for state "path_end"
2023/09/18 12:19:20 DEBUG : teamstest: config out: out=&{State:path_end Option:<nil> OAuth:<nil> Error: Result:teams/redacted/}, err=<nil>
2023/09/18 12:19:20 DEBUG : teamstest: config in: state="path_end", result="teams/redacted/"
2023/09/18 12:19:20 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/18 12:19:20 DEBUG : HTTP REQUEST (req 0xc000b84700)
2023/09/18 12:19:20 DEBUG : GET /v1.0/sites/root:teams/redacted/ HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.64.0
Authorization: XXXX
Accept-Encoding: gzip

Output of rclone config create thijstest2 onedrive config_type=url config_site_url=https://fabriquenl.sharepoint.com/teams/5bf4fee38919a5bbfeaad60b7a7437df -vv --dump bodies

PS C:\Users\Thijs\Fabrique\it - Documents\migratie redacted\scripts_csv> . 'C:\Users\Thijs\Fabrique\it - Documents\migratie redacted\scripts_csv\RC_create_remotes.ps1'
2023/09/18 12:25:15 DEBUG : rclone: Version "v1.64.0" starting with parameters ["C:\\Users\\Thijs\\AppData\\Local\\Microsoft\\WinGet\\Packages\\Rclone.Rclone_Microsoft.Winget.Source_8wekyb3d8bbwe\\rclone-v1.64.0-windows-amd64\\rclone.exe" "config" "create" "thijstest2" "onedrive" "config_type=url" "config_site_url=https://redacted.sharepoint.com/teams/redacted" "-vv" "--dump" "bodies"]
2023/09/18 12:25:15 DEBUG : Using config file from "C:\\Users\\Thijs\\AppData\\Roaming\\rclone\\rclone.conf"
2023/09/18 12:25:15 DEBUG : thijstest2: config in: state="", result=""
2023/09/18 12:25:15 DEBUG : thijstest2: config out: out=&{State:*oauth,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:25:15 DEBUG : thijstest2: config in: state="*oauth,choose_type,,", result=""
2023/09/18 12:25:15 DEBUG : thijstest2: config out: out=&{State:*oauth-confirm,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:25:15 DEBUG : thijstest2: config in: state="*oauth-confirm,choose_type,,", result=""
2023/09/18 12:25:15 DEBUG : Auto confirm is set, choosing default "true" for state "*oauth-islocal,choose_type,,", override by setting config parameter "config_is_local"
2023/09/18 12:25:15 DEBUG : thijstest2: config out: out=&{State:*oauth-islocal,choose_type,, Option:<nil> OAuth:<nil> Error: Result:true}, err=<nil>
2023/09/18 12:25:15 DEBUG : thijstest2: config in: state="*oauth-islocal,choose_type,,", result="true"
2023/09/18 12:25:15 DEBUG : thijstest2: config out: out=&{State:*oauth-do,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:25:15 DEBUG : thijstest2: config in: state="*oauth-do,choose_type,,", result=""
2023/09/18 12:25:15 DEBUG : Starting auth server on 127.0.0.1:53682
2023/09/18 12:25:15 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=qNMeWBSCTVw79xDaw0A78A
2023/09/18 12:25:15 NOTICE: Log in and authorize rclone for access
2023/09/18 12:25:15 NOTICE: Waiting for code...
2023/09/18 12:25:16 DEBUG : Redirecting browser to: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?access_type=offline&client_id=b15665d9-eda6-4092-8539-0eec376afd59&redirect_uri=http%3A%2F%2Flocalhost%3A53682%2F&response_type=code&scope=Files.Read+Files.ReadWrite+Files.Read.All+Files.ReadWrite.All+Sites.Read.All+offline_access&state=qNMeWBSCTVw79xDaw0A78A
2023/09/18 12:25:23 DEBUG : Received GET request on auth server to "/"
2023/09/18 12:25:23 NOTICE: Got code
2023/09/18 12:25:23 DEBUG : Closing auth server
2023/09/18 12:25:23 DEBUG : Closed auth server with error: accept tcp 127.0.0.1:53682: use of closed network connection
2023/09/18 12:25:23 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2023/09/18 12:25:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/18 12:25:23 DEBUG : HTTP REQUEST (req 0xc000afef00)
2023/09/18 12:25:23 DEBUG : POST /common/oauth2/v2.0/token HTTP/1.1
Host: login.microsoftonline.com
User-Agent: rclone/v1.64.0
Content-Length: 904
Authorization: XXXX
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

code=redacted
2023/09/18 12:25:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/18 12:25:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/18 12:25:23 DEBUG : HTTP RESPONSE (req 0xc000afef00)
2023/09/18 12:25:23 DEBUG : HTTP/1.1 200 OK
Content-Length: 3295
Cache-Control: no-store, no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 18 Sep 2023 10:25:22 GMT
Expires: -1
P3p: CP="DSP CUR OTPi IND OTRi ONL FIN"
Pragma: no-cache
Set-Cookie: fpc=AtEds1Vdx5dCqQpvtyWpuOrz27gSAQAAAJIcmtwOAAAA; expires=Wed, 18-Oct-2023 10:25:23 GMT; path=/; secure; HttpOnly; SameSite=None
Set-Cookie: x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly
Set-Cookie: stsservicecookie=estsfd; path=/; secure; samesite=none; httponly
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Ms-Ests-Server: 2.1.16314.5 - FRC ProdSlices
X-Ms-Request-Id: a92d7fd8-f16f-4245-a437-59ccfd847100
X-Xss-Protection: 0

{"token_type":"Bearer","scope":"Files.Read Files.Read.All Files.ReadWrite Files.ReadWrite.All Sites.Read.All profile openid email","expires_in":3982,"ext_expires_in":3982,"access_token":"redacted"}
2023/09/18 12:25:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/18 12:25:23 DEBUG : Saving config "token" in section "thijstest2" of the config file
2023/09/18 12:25:23 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2023/09/18 12:25:23 DEBUG : thijstest2: Saved new token in config file
2023/09/18 12:25:23 DEBUG : thijstest2: config out: out=&{State:*oauth-done,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:25:23 DEBUG : thijstest2: config in: state="*oauth-done,choose_type,,", result=""
2023/09/18 12:25:23 DEBUG : thijstest2: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:25:23 DEBUG : thijstest2: config in: state="choose_type", result=""
2023/09/18 12:25:23 DEBUG : Override value found, choosing value "url" for state "choose_type_done"
2023/09/18 12:25:23 DEBUG : thijstest2: config out: out=&{State:choose_type_done Option:<nil> OAuth:<nil> Error: Result:url}, err=<nil>
2023/09/18 12:25:23 DEBUG : thijstest2: config in: state="choose_type_done", result="url"
2023/09/18 12:25:23 DEBUG : thijstest2: config out: out=&{State:url Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:25:23 DEBUG : thijstest2: config in: state="url", result=""
2023/09/18 12:25:23 DEBUG : Override value found, choosing value "https://redacted.sharepoint.com/teams/redacted" for state "url_end"
2023/09/18 12:25:23 DEBUG : thijstest2: config out: out=&{State:url_end Option:<nil> OAuth:<nil> Error: Result:https://redacted.sharepoint.com/teams/redacted}, err=<nil>
2023/09/18 12:25:23 DEBUG : thijstest2: config in: state="url_end", result="https://redacted.sharepoint.com/teams/redacted"
2023/09/18 12:25:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/18 12:25:23 DEBUG : HTTP REQUEST (req 0xc000aff400)
2023/09/18 12:25:23 DEBUG : GET /v1.0/sites/root:/sites/https://redacted.sharepoint.com/teams/redacted HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.64.0
Authorization: XXXX
Accept-Encoding: gzip

2023/09/18 12:25:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/18 12:25:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/18 12:25:23 DEBUG : HTTP RESPONSE (req 0xc000aff400)
2023/09/18 12:25:23 DEBUG : HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Client-Request-Id: redacted
Content-Type: application/json
Date: Mon, 18 Sep 2023 10:25:22 GMT
Request-Id: redacted
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"005","RoleInstance":"AM4PEPF00028B8B"}}

106
{"error":{"code":"BadRequest","message":"Resource not found for the segment 'redacted.sharepoint.com'.","innerError":{"date":"2023-09-18T10:25:23","request-id":"redacted","client-request-id":"redacted"}}}
0

2023/09/18 12:25:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/09/18 12:25:23 DEBUG : thijstest2: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error:Failed to query available site by relative path: HTTP error 400 (400 Bad Request) returned body: "{\"error\":{\"code\":\"BadRequest\",\"message\":\"Resource not found for the segment 'redacted.sharepoint.com'.\",\"innerError\":{\"date\":\"2023-09-18T10:25:23\",\"request-id\":\"redacted\",\"client-request-id\":\"redacted\"}}}" Result:}, err=<nil>
Failed to query available site by relative path: HTTP error 400 (400 Bad Request) returned body: "{\"error\":{\"code\":\"BadRequest\",\"message\":\"Resource not found for the segment 'redacted.sharepoint.com'.\",\"innerError\":{\"date\":\"2023-09-18T10:25:23\",\"request-id\":\"redacted\",\"client-request-id\":\"redacted\"}}}"

2023/09/18 12:25:23 DEBUG : thijstest2: config in: state="choose_type", result=""
2023/09/18 12:25:23 DEBUG : Override value found, choosing value "url" for state "choose_type_done"
2023/09/18 12:25:23 DEBUG : thijstest2: config out: out=&{State:choose_type_done Option:<nil> OAuth:<nil> Error: Result:url}, err=<nil>
2023/09/18 12:25:23 DEBUG : thijstest2: config in: state="choose_type_done", result="url"
2023/09/18 12:25:23 DEBUG : thijstest2: config out: out=&{State:url Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/09/18 12:25:23 DEBUG : thijstest2: config in: state="url", result=""
2023/09/18 12:25:23 DEBUG : Override value found, choosing value "https://redacted.sharepoint.com/teams/redacted" for state "url_end"
2023/09/18 12:25:23 DEBUG : thijstest2: config out: out=&{State:url_end Option:<nil> OAuth:<nil> Error: Result:https://redacted.sharepoint.com/teams/redacted}, err=<nil>
2023/09/18 12:25:23 DEBUG : thijstest2: config in: state="url_end", result="https://redacted.sharepoint.com/teams/redacted"
2023/09/18 12:25:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/09/18 12:25:23 DEBUG : HTTP REQUEST (req 0xc000a00700)
2023/09/18 12:25:23 DEBUG : GET /v1.0/sites/root:/sites/https://redacted.sharepoint.com/teams/redacted HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.64.0
Authorization: XXXX
Accept-Encoding: gzip

Verbose output of the interactive configurator I have already posted yesterday.

This URL doesn't look right.

I think it should have a / after the root:

So from your original transcript

So you need config_sharepoint_url=/teams/redacted I think.

I had a look at the code for the sharepoint_url

This looks like it should work too, but...

I see a bug in the code here though and I've attempted to fix that.

v1.65.0-beta.7380.1fc005864.fix-onedrive-config on branch fix-onedrive-config (uploaded in 15-30 mins)

So, in summary I think this should work with rclone v1.64 (note extra /)

rclone config create teamstest onedrive config_type=path config_sharepoint_url=/teams/redacted

And this should work with the beta above

rclone config create thijstest2 onedrive config_type=url config_site_url=https://fabriquenl.sharepoint.com/teams/redacted

I hope that works :crossed_fingers: and I'm sorry this has been such a saga!