Unable to open OneDrive files

I added my personal OneDrive account using Settings > Online Accounts > Microsoft 365. When it asked for the Client ID and Tenant ID I just left them blank. I linked my account and allowed Gnome access when it asked.

The problem I am having is that I can click on my Microsoft Account in Files, and I can even browse through the folders and see all the files. However, when I try to open a file I get an error. Most apps report it as an “HTTP Error: Unauthorized”. LibreOffice gives the most information and says both the error code and message are “unauthenticated”.

When I open my terminal and do ls -l I can see that the files are rw for the user and that the user and group are correctly my username.

I also noticed that if I right click on a file in Files and select Properties, under Permissions it says None. If I click on Permissions to get more information, it says `Unknown Permissions. The permissions of “myfile.txt” could not be determined.

Is anyone able to successfully use a personal OneDrive account and open or edit their files?

I’m using Ubuntu 24.04.1 LTS.

Are you talking about this?

If you do not use an organizational account, do not complicate your life …

Do I maybe have an older version of Gnome? When I click on Microsoft 365 in the Online Accounts section I don’t see the first switch. All I see is this:

Try to update Ubuntu around 24.10 …

Otherwise, I use Fedora, it’s a bit of “official distribution” here.

How do I add a OneDrive online account? might help.

1 Like

Hi everyone. I appreciate the responses, but I don’t think my issues is a question of how to add the account.

I believe I’ve correctly added the account, but there is still some issue with accessing the files. I’m able to successfully add the account and browse and see all my files and folders, but I’m just not able to open them.

1 Like

Maybe LibreOffice doesn’t use GIO to access the files but instead tries to open the URL itself. In that case that would almost certainly fail for URL schemas that are not supported by LibreOffice itself or require authentication.

You can try copying the libreoffice .desktop files from /usr/share/applications/ to ~/.local/share/applications/ and then edit them to change the Exec key to use %F instead of %U to force going through GIO/GVFS via the fuse daemon by stopping it from claiming that it supports URLs.

Onlyoffice does it, however …

Works fine for me in Ubuntu 24.04.1 LTS. No permission issues.

Can open / edit .odt documents in LibreOffice (.deb not snap) fine too.

Can you try removing and adding the 365 account from Settings app? I just ignore the 2 fields shown in this image and click 'Sign in...'.

I believe something has changed this month either in a recent February 2025 package upgrade to Ubuntu 24.04, or some change on the Microsoft side.

Reason I say this is that I have been reading and writing files to my OneDrive folder for several months on multiple Ubuntu 24.04 machines up until 18-Feb-25.

I’m only piecing this together now because I’ve been away from the computers due to vacation. Here’s what I remember from mid-month and where I stand today:

Around mid-February, Microsoft started sending me several emails a day with login PIN numbers for log-in attempts to my Microsoft account I didn’t initiate. I never had that before, but I imagine invalid login attempts using my ID have been happening for years. To put a stop to those messages, I enabled the MS Authenticator app for a week, which indeed stopped those notifications.

Once I returned to work and noticed that my OneDrive files couldn’t be opened locally – but were visible – I deactivated the Authenticator app thinking that had to be root-cause of my problem. Unfortunately, I get the same error now as the original OP which is how I found this thread.

I thought maybe this was self-inflicted be me starting to use the MS Authenticator app. But I turned that off. Also, I get the same error when connecting to another Microsoft account that never used the authenticator app, and it’s an account I never logged into using any of my Ubuntu machines.

At present, I’m on 24.04.2 LTS. And @Sid says it’s working on 24.04.1 LTS.

Using Timeshift, I just rolled back to 24.04.1 from 14-Feb-25 and still experience the issue.

Can see the issue now in Ubuntu 24.04 LTS. (probably due to Ubuntu / Microsoft phased updates?)

Below I try opening gvfsd.log text file from terminal.

Fails in Ubuntu 24.04 LTS:

Here the top folders are

  • root
  • Shared with me
$ less gvfsd.log
{"error":{"code":"unauthenticated","message":"Unauthenticated"}}
gvfsd.log (END)

Works in Debian Unstable:

Same account works on Debian Unstable

Here the top folders are

  • Bundles_b896a3123da1...ba317
  • Shared with me
$ less gvfsd.log
trash: Added new job source 0x5b290b2acb60 (GVfsBackendTrash)
trash: Queued new job 0x5b290b2b65e0 (GVfsJobMount)
trash: send_reply(0x5b290b2b65e0), failed=0 ()
...

I remember top folder used to be "My Folders" in both above cases. Appears something changed in the last few days.

/cc @andyholmes

1 Like

This doesn’t seem to have much to do with GNOME Online Accounts, otherwise I would expect the user to be notified of expired credentials. I’d recommend opening a report in gvfs (https://gitlab.gnome.org/GNOME/gvfs/-/issues), which may get picked up by libmsgraph if necessary.

1 Like

Yes, I too see “root” and “shared with me.”

Also, yesterday my wife complained to me that she can’t access my shared OneDrive folder on her Windows 11 computer.

This now makes me feel its unrelated to GNOME, and likely a change in the Microsoft ecosystem. Fortunately if it is broken for Win 11 users, maybe a fix on the Microsoft side will come swiftly.