How do I add a OneDrive online account?

One of the new GNOME 46 features I was really looking forward to is support for OneDrive. However, I can’t seem to be able to figure out how to add my account. I’ve seen that there are some discussions revolving around this feature not working as intended (e.g. goabackend: update Microsoft client ID (!187) · Merge requests · GNOME / gnome-online-accounts · GitLab), but I don’t really know what these are about. Therefore, my question is simply: How do I add my OneDrive online account in GNOME 46?

2 Likes

I have the same problem. I connected my Microsoft account, and it only connected email, which I never use, so I don’t know whether that worked or not. So far, nothing is showing up in Nautilus for me to be able to access my files.

Have you connected both your Microsoft Personal Account and your Microsoft 365 account via a client ID? It looks like the Microsoft Personal Account link is only used for synchronizing mail.

To link your Microsoft 365 account, you need a client ID.

First, go to portal.azure.com.
Once logged in, find the Microsoft Entra ID service. (previously Azure Active Directory)
On the left, you should see a bar with different service options. Select “App Registrations”, then in the new view click “New Registration”.

Enter any name for your “app” entry and set the appropriate options; some are optional and you don’t need to fill them out. Then, create the new registration.

You should be redirected to a new page with your registration information.
Copy the “Application (client) ID” field, and paste it into GNOME online accounts.

That should be all. I am personally having trouble because no matter how many browser cookies I delete (and cache I clear) it keeps using my school microsoft account and, of course, fails. But hopefully this helps! :grin:

I don’t have a Microsoft 365 account, but I do have OneDrive (via my personal Microsoft account).

I don’t think you need a Microsoft 365 account to get your client ID from Microsoft Entra ID, but I am not sure since I tested it on an account that does have Microsoft 365 activated.

I can log in to portal.azure.com, but I cannot view/create the Microsoft Entra ID item, because I get an error (“Interaction required… Application requested a user session which does not exist.”)

Even if this worked, I’m not sure if this is ideal from a UX perspective. Are there any plans to simplify this procedure, so that it works like adding e.g. Google Drive (where users need to sign in to their Google account and everything works)?

The client ID is not needed with the gnome-online-accounts 3.50.1 (GNOME 46.1) version, it is provided by GNOME already. If you don’t have the 3.50.1 (GNOME 46.1) version yet, you can use the client ID from it anyway: 8ef61e06-9fd5-49af-9b63-6983aede4213 (meson_options.txt · 4eb9214be123ff9c039f5673be1e180b44c7643f · GNOME / gnome-online-accounts · GitLab).

To get the OneDrive share in the sidebar of the Files application, one has to set up Microsoft 365 (not Microsoft Personal) account through the Online Accounts panel in the Settings application. However, to create the Microsoft 365 account you can use the same credentials as you have for the Microsoft Personal account…

I think I do have GNOME 46.1, but gnome-online-accounts shows up as 3.50.1-1 on my Arch Linux:

❯ pacman -Qs gnome | grep online
local/gnome-online-accounts 3.50.1-1

I’m not sure how I am supposed to set up a Microsoft 365 account with the same credentials. I usually log in with my Microsoft email and password, but this does not work here (filling in my Microsoft email in the Client ID field does not work):

Using the client ID you mentioned does work! So it seems I’m not using the latest version?

With the 3.50.1 (GNOME 46.1) version, I am convinced it should work with an empty client ID (not your e-mail). Sadly the UI is confusing, but an effort is underway to improve it: Microsoft 365 account: setup dialog is a bit confusing (#319) · Issues · GNOME / gnome-online-accounts · GitLab.

1 Like

Sadly true. With the same personal account one need to access the “Microsoft Personal” setup in order to have mail sync, and “Microsoft 365” setup for Files snyc (OneDrive mount).

That’s good to know. Thank you for the info! :grin: