Skip to content

Bug: Get AADSTS70000: The provided value for the 'code' parameter is not valid. as a response #3609

Description

@Z0t

Describe the bug

When I try to set up a new instance of ubuntu and latest onedrive client I get

AADSTS70000: The provided value for the 'code' parameter is not valid.

I am working in a Plucky Container that I set up with universe 2 weeks ago. Not how that worked given what I've learned

I am now in a VM in proxmox, I got the same error in Ubuntu 24.04 LTS. After reading here, I wiped it and moved to 25.10.

This has been happening for 24 hours now, so it does not appear to be transient.

Operating System Details

uname -a
Linux hdmi 6.17.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 21:44:46 UTC 2025 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 25.10
Release:	25.10
Codename:	questing

Client Installation Method

From 3rd Party Source (PPA, OpenSuSE Build Service etc)

OneDrive Account Type

Personal

What is your OneDrive Application Version

onedrive v2.5.9-1+np1+1.1

What is your OneDrive Application Configuration

onedrive --version
onedrive v2.5.9-1+np1+1.1

What is your 'curl' version

curl --version
curl 8.14.1 (x86_64-pc-linux-gnu) libcurl/8.14.1 OpenSSL/3.5.3 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.2 libssh2/1.11.1 nghttp2/1.64.0 librtmp/2.3 OpenLDAP/2.6.10
Release-Date: 2025-06-04, security patched: 8.14.1-2ubuntu1
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

mount
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=692116k,nr_inodes=819200,mode=755,inode64)
/dev/sda2 on / type ext4 (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=1700508k,nr_inodes=425127,mode=755,inode64)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=600,ptmxmode=000)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
none on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=35,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=6513)
tmpfs on /run/credentials/systemd-journald.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/credentials/systemd-resolved.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/var/lib/snapd/snaps/bare_5.snap on /snap/bare/5 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core24_1267.snap on /snap/core24/1267 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core22_2133.snap on /snap/core22/2133 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core22_2216.snap on /snap/core22/2216 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/desktop-security-center_59.snap on /snap/desktop-security-center/59 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/desktop-security-center_99.snap on /snap/desktop-security-center/99 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/firmware-updater_210.snap on /snap/firmware-updater/210 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/firefox_7672.snap on /snap/firefox/7672 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/firefox_6966.snap on /snap/firefox/6966 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/firmware-updater_167.snap on /snap/firmware-updater/167 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/gnome-42-2204_226.snap on /snap/gnome-42-2204/226 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/gtk-common-themes_1535.snap on /snap/gtk-common-themes/1535 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/prompting-client_104.snap on /snap/prompting-client/104 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/openscad-nightly_5339.snap on /snap/openscad-nightly/5339 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/snap-store_1300.snap on /snap/snap-store/1300 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/snapd_25935.snap on /snap/snapd/25935 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/snapd_25202.snap on /snap/snapd/25202 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/snapd-desktop-integration_315.snap on /snap/snapd-desktop-integration/315 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=1048576,inode64)
/var/lib/snapd/snaps/thunderbird_812.snap on /snap/thunderbird/812 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/snapd/ns type tmpfs (rw,nosuid,nodev,size=692116k,nr_inodes=819200,mode=755,inode64)
nsfs on /run/snapd/ns/prompting-client.mnt type nsfs (rw)
nsfs on /run/snapd/ns/snapd-desktop-integration.mnt type nsfs (rw)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=346056k,nr_inodes=86514,mode=700,uid=1000,gid=1000,inode64)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
nsfs on /run/snapd/ns/firefox.mnt type nsfs (rw)
nsfs on /run/snapd/ns/firmware-updater.mnt type nsfs (rw)
/var/lib/snapd/snaps/gnome-42-2204_247.snap on /snap/gnome-42-2204/247 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
(ins)

What are all your local file system partition types

lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0
     squash 4.0                                                    0   100% /snap/bare/5
loop1
     squash 4.0                                                    0   100% /snap/core22/2133
loop2
     squash 4.0                                                    0   100% /snap/core24/1267
loop3
     squash 4.0                                                    0   100% /snap/desktop-security-center/59
loop4
     squash 4.0                                                    0   100% /snap/core22/2216
loop5
     squash 4.0                                                    0   100% /snap/desktop-security-center/99
loop6
     squash 4.0                                                    0   100% /snap/firefox/6966
loop7
     squash 4.0                                                    0   100% /snap/firefox/7672
loop8
     squash 4.0                                                    0   100% /snap/firmware-updater/167
loop9
     squash 4.0                                                    0   100% /snap/firmware-updater/210
loop10
     squash 4.0                                                    0   100% /snap/gnome-42-2204/226
loop11
     squash 4.0                                                    0   100% /snap/gtk-common-themes/1535
loop12
     squash 4.0                                                    0   100% /snap/openscad-nightly/5339
loop13
     squash 4.0                                                    0   100% /snap/prompting-client/104
loop14
     squash 4.0                                                    0   100% /snap/snap-store/1300
loop15
     squash 4.0                                                    0   100% /snap/snapd/25202
loop16
     squash 4.0                                                    0   100% /snap/snapd/25935
loop17
     squash 4.0                                                    0   100% /snap/snapd-desktop-integration/315
loop18
     squash 4.0                                                    0   100% /snap/thunderbird/812
loop19
     squash 4.0                                                    0   100% /snap/gnome-42-2204/247
sda                                                                         
├─sda1
│    vfat   FAT32       FA18-C36A                                 1G     1% /boot/efi
└─sda2
     ext4   1.0         508f85c3-e59f-4b98-94c1-6388c3417e05   44.6G    23% /
sr0

How do you use 'onedrive'

VM loaded in proxmox, isolated to itself. Fresh install of Ubuntu 25.10. No shared drives (outside of Proxmox/VM redirect)

Steps to reproduce the behaviour

opendrive --sync

When I try to GUI it says it "passed" but then nothing works. I do see the errors pop up the desktop notifications. Seems like a bug in the GUI that did not detect an error.

Complete Verbose Log Output

onedrive --verbose --sync
No user or system config file found, using application defaults
Using 'user' configuration path for application config and state data: /home/zot/.config/onedrive

WARNING: Configured 'threads = 8' exceeds available CPU cores (4).
         This may lead to reduced performance, CPU contention, and instability. For best results, set 'threads' no higher than the number of physical CPU cores.

D-Bus message bus daemon is available; GUI notifications are now enabled
Using IPv4 and IPv6 (if configured) for all network operations
Attempting to contact the Microsoft OneDrive Service
Successfully reached the Microsoft OneDrive Service
Checking Application Version ...
Attempting to initialise the OneDrive API ...
Configuring Global Azure AD Endpoints

Please authorise this application by visiting the following URL:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-[REDACTED]&scope=Files.ReadWrite%20Files.ReadWrite.All%20Sites.ReadWrite.All%20offline_access&response_type=code&prompt=login&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient

After completing the authorisation in your browser, copy the full redirect URI (from the address bar) and paste it below.

Paste redirect URI here: https://login.microsoftonline.com/common/oauth2/nativeclient?code=M.C507_SN1.2.U.DjIAnfKYY7M*2FfsPvjN3eepHX9ZH8YxTAMgl4dwXI*CCXV8Hg!E67mF4zgQYnLnJ6YKFhP5gwizdOdbM9wJLDwZbJsrEdHTZndaWsRb0U2cYNegy0x2j1lD4!*QOKDnJ*XxF13Dtxo2kxVfcqlvciWwaewdaXhyMtAnGb0a2VGa1e6kqCoG8D2puU4YXD1bVDuswqrkGnXaUeFHRLsbxXFiDnbk9gbpiFIxSllcb8j9Vxfw83ovt8PTmCC!DCuq8PPYi*WZY2kUxYbOGtDMY43halamebTssrPj6QOu2lXuyIsU5FluOTzgR8sA0ICtpSa8HETOlsyQTxCoNO8RvgMiJzcTXm9QirgnCP9FPgaic!*b3CvOHBfqPlpf!UJ6XdZEngc!udXwgHVmZH1ZsZTHAraHaF8ZGQJWgoubMIzD9Q0ZNCWRo9LlGht1sNu!8xW6QIBRQpC3fmXFAehaKZBgZtL5yDr![REDACTED]

AADSTS70000: The provided value for the 'code' parameter is not valid. Trace ID: 3b23ba97-3cef-4ed1-b50b-0b99f8c41f01 Correlation ID: 82a69c91-1387-4325-9ed8-065161e9640e Timestamp: 2026-01-18 21:50:17Z

ERROR: You will need to issue a --reauth and re-authorise this client to obtain a fresh auth token.

Screenshots

No response

Other Log Information or Details

I do not see anything dmesg or journalctl

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions