OneDrive - how to remove the existing access

What is the problem you are having with rclone?

Can't stop it from accessing OneDrive (other people using the same config)

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

1.55.0.0

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

OneDrive

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

rclone.exe mount onedrive:

The rclone config contents with secrets removed.

[onedrive]
type = onedrive
client_id = 
client_secret = 
token = {"access_token":"original token created before I deleted the app from Azure"}
drive_id = drive_id_I_dont_want_to_share
drive_type = personal

A log from the command with the -vv flag

rclone.exe mount onedrive:3d/tracks O: -vv --vfs-cache-mode full -vv --stats-one-line -P --stats 2s --config jendabek.conf
2022/01/27 22:02:10 DEBUG : rclone: Version "v1.53.2" starting with parameters ["rclone.exe" "mount" "onedrive:3d/tracks" "O:" "-vv" "--vfs-cache-mode" "full" "-vv" "--stats-one-line" "-P" "--stats" "2s" "--config" "jendabek.conf"]
2022/01/27 22:02:10 DEBUG : Creating backend with remote "onedrive:3d/tracks"
2022/01/27 22:02:10 DEBUG : Using config file from "C:\\programs-portable\\RClone\\jendabek.conf"
2022/01/27 22:02:12 INFO  : One drive root '3d/tracks': poll-interval is not supported by this remote
2022/01/27 22:02:12 DEBUG : vfs cache: root is "\\\\?\\C:\\Users\\jendabek\\AppData\\Local\\rclone\\vfs\\onedrive\\3d\\tracks"
2022/01/27 22:02:12 DEBUG : vfs cache: metadata root is "\\\\?\\C:\\Users\\jendabek\\AppData\\Local\\rclone\\vfs\\onedrive\\3d\\tracks"
2022/01/27 22:02:12 DEBUG : Creating backend with remote "\\\\?\\C:\\Users\\jendabek\\AppData\\Local\\rclone\\vfs\\onedrive\\3d\\tracks"
2022/01/27 22:02:12 DEBUG : fs cache: renaming cache item "\\\\?\\C:\\Users\\jendabek\\AppData\\Local\\rclone\\vfs\\onedrive\\3d\\tracks" to be canonical "//?/C:/Users/jendabek/AppData/Local/rclone/vfs/onedrive/3d/tracks"
2022/01/27 22:02:12 DEBUG : fs cache: switching user supplied name "\\\\?\\C:\\Users\\jendabek\\AppData\\Local\\rclone\\vfs\\onedrive\\3d\\tracks" for canonical name "//?/C:/Users/jendabek/AppData/Local/rclone/vfs/onedrive/3d/tracks"
2022/01/27 22:02:12 DEBUG : One drive root '3d/tracks': Mounting on "O:"
2022/01/27 22:02:12 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2022/01/27 22:02:12 DEBUG : One drive root '3d/tracks': Mounting with options: ["-o" "fsname=onedrive:3d/tracks" "-o" "subtype=rclone" "-o" "max_readahead=131072" "-o" "attr_timeout=1" "-o" "atomic_o_trunc" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=onedrive 3d tracks"]
2022/01/27 22:02:12 DEBUG : One drive root '3d/tracks': Init:
2022/01/27 22:02:12 DEBUG : One drive root '3d/tracks': >Init:
2022/01/27 22:02:12 DEBUG : /: Statfs:
2022/01/27 22:02:12 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:272367616 Bfree:215366847 Bavail:215366847 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2022/01/27 22:02:12 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:12 DEBUG : /: >Getattr: errc=0
2022/01/27 22:02:12 DEBUG : /: Readlink:
2022/01/27 22:02:12 DEBUG : /: >Readlink: linkPath="", errc=-40
The service rclone has been started.
2022/01/27 22:02:13 DEBUG : /: Statfs:
2022/01/27 22:02:13 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:272367616 Bfree:215366847 Bavail:215366847 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2022/01/27 22:02:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:13 DEBUG : /: >Getattr: errc=0
2022/01/27 22:02:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:13 DEBUG : /: >Getattr: errc=0
2022/01/27 22:02:13 DEBUG : /: Opendir:
2022/01/27 22:02:13 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/01/27 22:02:13 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/01/27 22:02:13 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/01/27 22:02:13 DEBUG : /: Releasedir: fh=0x0
2022/01/27 22:02:13 DEBUG : /: >Releasedir: errc=0
2022/01/27 22:02:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:13 DEBUG : /: >Getattr: errc=0
2022/01/27 22:02:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:13 DEBUG : /: >Getattr: errc=0
2022/01/27 22:02:13 DEBUG : /: Opendir:
2022/01/27 22:02:13 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/01/27 22:02:13 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/01/27 22:02:13 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/01/27 22:02:13 DEBUG : /: Releasedir: fh=0x0
2022/01/27 22:02:13 DEBUG : /: >Releasedir: errc=0
2022/01/27 22:02:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:13 DEBUG : /: >Getattr: errc=0
2022/01/27 22:02:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:13 DEBUG : /: >Getattr: errc=0
2022/01/27 22:02:13 DEBUG : /: Opendir:
2022/01/27 22:02:13 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/01/27 22:02:13 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/01/27 22:02:13 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/01/27 22:02:13 DEBUG : /: Releasedir: fh=0x0
2022/01/27 22:02:13 DEBUG : /: >Releasedir: errc=0
2022/01/27 22:02:14 INFO  :          0 / 0 Bytes, -, 0 Bytes/s, ETA -
2022/01/27 22:02:16 DEBUG : /autorun.inf: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:16 DEBUG : /autorun.inf: >Getattr: errc=-2
2022/01/27 22:02:16 INFO  :          0 / 0 Bytes, -, 0 Bytes/s, ETA -
2022/01/27 22:02:28 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:28 INFO  :          0 / 0 Bytes, -, 0 Bytes/s, ETA -
2022/01/27 22:02:28 DEBUG : /: >Getattr: errc=0
2022/01/27 22:02:28 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:28 DEBUG : /: >Getattr: errc=0
2022/01/27 22:02:28 DEBUG : /: Opendir:
2022/01/27 22:02:28 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/01/27 22:02:28 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/01/27 22:02:28 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/01/27 22:02:28 DEBUG : /: Releasedir: fh=0x0
2022/01/27 22:02:28 DEBUG : /: >Releasedir: errc=0
2022/01/27 22:02:28 DEBUG : /AutoRun.inf: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/01/27 22:02:28 DEBUG : /AutoRun.inf: >Getattr: errc=-2
2022/01/27 22:02:30 INFO  :          0 / 0 Bytes, -, 0 Bytes/s, ETA -
2022/01/27 22:02:32 INFO  :          0 / 0 Bytes, -, 0 Bytes/s, ETA -
2022/01/27 22:02:34 INFO  :          0 / 0 Bytes, -, 0 Bytes/s, ETA -

I admit I am very noob with RClone and all that Azure thingy, so sorry for probably stupid question.
I managed to get RClone working my OneDrive by following the RClone-OneDrive manual, but now I want to stop / block RClone from accessing it (using existing config / token) ... and unfortunately I am not able find out how to achieve that.
I thought I will manage to do so by removing the secret and then the whole app from Azure, but nothing actually happened - it is still possible to access OneDrive using RClone & previous config / token.

Thank you for any advices and again - sorry for maybe stupid question.

hello,

hard to give good advice as you ignored to answer the entire set of questions, that help us to help you.

if you delete the credentials from azure, then rclone cannot access onedrive.

if you want rclone to stop accessing ondrive, then
--- just stop using rclone to access onedrive, nobody is forcing you to do that?
--- delete the onedrive remote from the config file.

I deleted the default questions because they are not relevant to this issue, but OK, will try to include them next time, sorry.

Unfortunately removing the credentials from Azure didn't help, it is still possible to access OneDrive using the original config.
I need to block the access for other people I shared the config with.

well, again, lacking any actionable details,
can only assume you made a mistake when removing the credentials.

What details you need to know?
Maybe I did some mistake, but I guess it doesn't matter now as I can't revert any action. But is there anything I can do now?

for whatever credentials/apps you created in azure, need to delete them.
choose which app you want to delete

I have already deleted it some weeks ago, so there is currently no app registered in Azure.
But I can still access OneDrive using RClone.

again, when you posted there was a template of questions,
at this point, need to answer all of them.

I have updated the main post

ok, tho easier to test using rclone lsd than rclone mount

well, as i suggest above, you need to delete the app from azure
if you have deleted it, it would appear here.

I don't have these options (like list of deleted applications) there.

if you deleted the credentials, then rclone cannot access the resources.
rclone does not have a --magic flag to work around that.

perhaps you are logged into wrong azure account.

That's what I was thinking as well ... but I am really, really sure I never ever used any other account for logging into Azure.

But I just noticed I keep getting these errors in Azure portal:
image

ok, here comes @ole

Hi Jan,

I would try removing the app permission in the Microsoft account having the personal OneDrive (which may be different from the Azure account used to create the clientID).

You can find the app permisions under “View App Access Details” in the “Privacy” tab of your Microsoft account.

Over to @asdffdsa - bed time in my time zone :slight_smile:

Guys, I love you! :smiley:
So for anybody potentially experiencing the same problem, the solution is really to remove RClone from Apps and services you've given access to on Microsoft Account related page:

This will stop RClone from accessing OneDrive.
Then I was able to set-up the new remote storage (on same OneDrive), give it the access again and successfully mount it, while it can't connect using the old config anymore - and that's exactly what I wanted to achieve.

Thank you again and good night @Ole

1 Like

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