Step-by-Step Guide: Enabling OneDrive File Access in Ubuntu 24.04 LTS

Among the many new features in Ubuntu 24.04 LTS is the ability to access your Microsoft OneDrive files through the Nautilus file manager.

No 3rd-party app downloads, no dodgy scripts to run, and no paid plans to cough up for because this nifty feature is part of GNOME 46 (and available in any Linux distribution using it, not just the latest Ubuntu LTS).

OneDrive file access works the same way as the (long-standing and popular) Google Drive integration: a Gvfs backend authorised through GNOME Online Accounts (via the Settings app), and then surfaced as an entry in the Nautilus sidebar.

Once configured you are able to browse, open, edit, move, and copy files to and from your cloud storage as if it was a local folder. There’s no sync or offline support, though.

I’ve seen some confusion about how to enable this feature so let’s go through it, step-by-step.

Accessing OneDrive Files in Nautilus

“I don’t see OneDrive listed”, people have said.

When you open the Settings app and select Online Accounts from the sidebar you’ll see a list of various account types, including 3 Microsoft ones:

  • Microsoft Personal
  • Microsoft 365
  • Microsoft Exchange

Microsoft Personal is utilized for e-mail, such as Outlook, Live, Hotmail. You’ll typically want to use this to authorize desktop email clients like Thunderbird and Geary to fetch and transmit emails using your Microsoft account.

To access your OneDrive documents using Nautilus, you’ll need to select the Microsoft 365 provider in Online Accounts.

The dialog box that appears may appear complex. There’s no mention of OneDrive or file access, only fields inquiring for client IDs and issuer data—it might not seem pertinent to normal users.

Ignore everything and click “Sign in…”

But don’t panic; ignore ALL of the text fields and options in the dialog.

Yes, really.

Click the “Sign in” button without entering anything in any of the fields to open another dialog:

Click the second Sign In: button.

The Microsoft website will open in your default web browser (it can take a few seconds to it to open so don’t fret if nothing happens at first).

Once the web page loads you can log in using your Microsoft account credentials. If you have several accounts be sure to enter the ones that the OneDrive files you wish to access are connected to.

And click “Sign In…” again

Next, you’ll be asked to confirmed you’re trying to “sign in to GNOME”. Click the “Continue” button to proceed:

You are trying to sign into GNOME

After you click “Continue” Firefox will (assuming you’ve not previously authorised it to do so) ask if you wish to allow Microsoft’s sign-in site to open goa-auth2 links.

Wait a second or so for the “Open Link” button to become clickable then click it:

Click the open link button to complete the authorisation

The Online Accounts window will zip back into focus and, all being well, you will see your Microsoft account details listed in the dialog, along with the Microsoft 365 logo and a toggle to turn Files access on and off:

Success!

When this toggle is turned on a virtual mount icon with your account name beside it will appear in the sidebar of the Nautilus file manager.

In Nautilus, click this new sidebar entry to “mount” your OneDrive cloud storage.

You can then browse the contents of your OneDrive like it was a regular folder — albeit with a bit of lag if your network is slow and/or you have a lot of files up in the cloud:

You won’t see file thumbnails for remote mounts by default. No, not a bug; Nautilus is configured to only load thumbnails/previews for local files. This is because loading previews for remote files can slow things down, increase data usage, and so on.

The ‘remote server’ icon is your OneDrive mount.

Image Source

You can manually change this behaviour in Nautilus‘ preferences:

Alas, changing this setting made no difference for me. Image thumbnails still don’t load, not unless I open the relevant file (e.g., view an image in the native Ubuntu image viewer) first. While annoying I don’t consider this a deal breaker.

And that’s it; you’ve now enabled OneDrive access in Ubuntu 24.04 LTS without needing to download anything else.

Tweaking things

You may want to tweak the Ubuntu Dock (Settings > Ubuntu Desktop) to hide unmounted drives or hide remote mounts from being shown. If not, get used to having a generic grey server icon taking up space in the dock.

You can also use toggle the Files switch in your Microsoft 365 account panel to disable/enable OneDrive access as and when you need it. Turning it off hides the mount icon in the Ubuntu Dock as well as the sidebar entry that shows in the Nautilus sidebar.


Posted

in

, , ,

by

Tags: