grzanka
(Leszek Grzanka)
November 24, 2022, 12:31pm
1
What is the problem you are having with rclone?
I would like to synchronise a certain subfolder of my business OneDrive space with a local folder.
The idea is to generate some files locally and move them by rclone
to a subfolder of OneDrive.
By doing this I would also like to protect all other files from accidental deletion by misuing rclone folder.
In other words, I would like to perform operation similar to mounting a remote subdir with write access.
Run the command 'rclone version' and share the full output of the command.
PS C:\Users\Legion\workspace\rclone> .\rclone.exe version
rclone v1.60.1
- os/version: Microsoft Windows 11 Home 22H2 (64 bit)
- os/kernel: 10.0.22621.819 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.19.3
- go/linking: static
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
One Drive
The rclone config contents with secrets removed.
[ifjonedrive_interim]
type = onedrive
drive_type = business
root_folder_id = 016RGUGOWSHGSXEHLSIZGKWSVETOVWJIZA
expose_onenote_files = true
link_scope = anonymous
token = {"access_token":"(...)","expiry":"2022-11-24T13:16:59.9476911+01:00"}
drive_id = (...)
See also my entry in the following issue:
opened 09:03AM - 25 Jan 22 UTC
Remote: One Drive
<!--
Welcome :-)
So you've got an idea to improve rclone? We love that!
Y… ou'll be glad to hear we've incorporated hundreds of ideas from contributors already.
Probably the latest beta (or stable) release has your feature, so try to update your rclone.
The update instructions are available at https://rclone.org/commands/rclone_selfupdate/
If it still isn't there, here is a checklist of things to do:
1. Search the old issues for your idea and +1 or comment on an existing issue if possible.
2. Discuss on the forum: https://forum.rclone.org/
3. Make a feature request issue (this is the right place!).
4. Be prepared to get involved making the feature :-)
Looking forward to your great idea!
The Rclone Developers
-->
#### The associated forum post URL from `https://forum.rclone.org`
As per previous discussion:
https://forum.rclone.org/t/cant-ls-onedrive-business-shared-folder-not-in-root-of-drive/19559
#### What is your current rclone version (output from `rclone version`)?
v1.57.0
#### What problem are you are trying to solve?
I'm trying to access a document library of a SharePoint site in my org.
The doc library is set up so I don't have access to list the root folder, only a special folder just for me a few levels deep. This is the same situation as described by someone else in the linked thread.
I can set it up ok, but I can't list it with rclone: `rclone lsd 'MySite:General/akdorsSpecialFolder'` first tries to get `MySite:General`, which is the one I don't have access to:
```sh
rclone -vvv --dump requests lsd 'MySite:General/akdorsSpecialFolder'
```
```
<7>DEBUG : GET /v1.0/drives/b!-[CENSORED]/root HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.57.0
Authorization: XXXX
Accept-Encoding: gzip
<7>DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<7>DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<7>DEBUG : HTTP RESPONSE (req 0xc000630200)
<7>DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: no-cache
Client-Request-Id: [CENSORED]
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Date: Tue, 25 Jan 2022 08:44:38 GMT
Odata-Version: 4.0
Request-Id: [CENSORED]
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"DataCenter":"Australia Southeast","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"[CENSORED]"}}
<7>DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<7>DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<7>DEBUG : HTTP REQUEST (req 0xc000576200)
<7>DEBUG : GET /v1.0/drives/b!-[CENSORED]/items/01[CENSORED]Z:/General: HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.57.0
Authorization: XXXX
Accept-Encoding: gzip
<7>DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<7>DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<7>DEBUG : HTTP RESPONSE (req 0xc000576200)
<7>DEBUG : HTTP/1.1 404 Not Found
Transfer-Encoding: chunked
Cache-Control: no-cache
Client-Request-Id: [CENSORED]
Content-Type: application/json
Date: Tue, 25 Jan 2022 08:44:37 GMT
Request-Id: [CENSORED]
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"DataCenter":"Australia Southeast","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"[CENSORED]"}}
```
#### How do you think rclone should be changed to solve that?
In the linked forum thread, and in comments in the source, it was explained that the traversal design was necessary to find children, as the graph API doesn't allow getting the id of a driveitem directly by path. While this may have been true at the time, it sems to no longer be the case: I can use the Graph Explorer (https://developer.microsoft.com/en-us/graph/graph-explorer) to call
`https://graph.microsoft.com/v1.0/drives/b!-[CENSORED]/root:/General/akdorsSpecialFolder`
and I get a 200 response. So, maybe rclone doesn't need to get children at every level from the root anymore? <-- hence, feature request :)
#### How to use GitHub
* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are affected by the same issue.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.
I've tried to solve my problem using root folder id, but this failed.
grzanka
(Leszek Grzanka)
November 25, 2022, 4:54pm
2
It seems an interesting update appeared here:
opened 09:03AM - 25 Jan 22 UTC
Remote: One Drive
<!--
Welcome :-)
So you've got an idea to improve rclone? We love that!
Y… ou'll be glad to hear we've incorporated hundreds of ideas from contributors already.
Probably the latest beta (or stable) release has your feature, so try to update your rclone.
The update instructions are available at https://rclone.org/commands/rclone_selfupdate/
If it still isn't there, here is a checklist of things to do:
1. Search the old issues for your idea and +1 or comment on an existing issue if possible.
2. Discuss on the forum: https://forum.rclone.org/
3. Make a feature request issue (this is the right place!).
4. Be prepared to get involved making the feature :-)
Looking forward to your great idea!
The Rclone Developers
-->
#### The associated forum post URL from `https://forum.rclone.org`
As per previous discussion:
https://forum.rclone.org/t/cant-ls-onedrive-business-shared-folder-not-in-root-of-drive/19559
#### What is your current rclone version (output from `rclone version`)?
v1.57.0
#### What problem are you are trying to solve?
I'm trying to access a document library of a SharePoint site in my org.
The doc library is set up so I don't have access to list the root folder, only a special folder just for me a few levels deep. This is the same situation as described by someone else in the linked thread.
I can set it up ok, but I can't list it with rclone: `rclone lsd 'MySite:General/akdorsSpecialFolder'` first tries to get `MySite:General`, which is the one I don't have access to:
```sh
rclone -vvv --dump requests lsd 'MySite:General/akdorsSpecialFolder'
```
```
<7>DEBUG : GET /v1.0/drives/b!-[CENSORED]/root HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.57.0
Authorization: XXXX
Accept-Encoding: gzip
<7>DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<7>DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<7>DEBUG : HTTP RESPONSE (req 0xc000630200)
<7>DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: no-cache
Client-Request-Id: [CENSORED]
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Date: Tue, 25 Jan 2022 08:44:38 GMT
Odata-Version: 4.0
Request-Id: [CENSORED]
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"DataCenter":"Australia Southeast","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"[CENSORED]"}}
<7>DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<7>DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<7>DEBUG : HTTP REQUEST (req 0xc000576200)
<7>DEBUG : GET /v1.0/drives/b!-[CENSORED]/items/01[CENSORED]Z:/General: HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.57.0
Authorization: XXXX
Accept-Encoding: gzip
<7>DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<7>DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<7>DEBUG : HTTP RESPONSE (req 0xc000576200)
<7>DEBUG : HTTP/1.1 404 Not Found
Transfer-Encoding: chunked
Cache-Control: no-cache
Client-Request-Id: [CENSORED]
Content-Type: application/json
Date: Tue, 25 Jan 2022 08:44:37 GMT
Request-Id: [CENSORED]
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"DataCenter":"Australia Southeast","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"[CENSORED]"}}
```
#### How do you think rclone should be changed to solve that?
In the linked forum thread, and in comments in the source, it was explained that the traversal design was necessary to find children, as the graph API doesn't allow getting the id of a driveitem directly by path. While this may have been true at the time, it sems to no longer be the case: I can use the Graph Explorer (https://developer.microsoft.com/en-us/graph/graph-explorer) to call
`https://graph.microsoft.com/v1.0/drives/b!-[CENSORED]/root:/General/akdorsSpecialFolder`
and I get a 200 response. So, maybe rclone doesn't need to get children at every level from the root anymore? <-- hence, feature request :)
#### How to use GitHub
* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are affected by the same issue.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.
In fact the mechanism of root folder id works well, but extracting root folder id is a bit cumbersome
system
(system)
Closed
December 25, 2022, 4:55pm
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.