How to sync KeePassium with OneDrive

KeePassium supports two synchronization methods for OneDrive:

Method 1: Direct in-app OneDrive connection

With this method, KeePassium communicates directly with OneDrive servers. This way, the app has full control over data transfer and does not depend on OneDrive app. As a result, the direct connection is more reliable than via the Files app.

To add your OneDrive-hosted database, follow these steps:

  • Open KeePassium settings → Network Access → enable it
  • Go to the list of databases, tap +Connect to Server
  • Select your storage type (personal or business)
  • You will be prompted to log into your OneDrive account.
    • As a result, KeePassium would receive and store an access token that authorizes the app for future connections. The app will not see nor store your OneDrive password.
  • Once you see your OneDrive contents, navigate to database file and select it.

Access permissions

In order to work with OneDrive storage directly, KeePassium needs several OneDrive API permissions, including the Files.ReadWrite.All. This is a rather wide permission that allows KeePassium to access any files that you can access, including files shared with you. With a narrower-scoped permission, KeePassium is unable to work with shared databases. (For more details, see GitHub issue #285.)

Client IDs for administrators

Your system administrator might need to additionally allow KeePassium to access OneDrive storage of your organization. Each app edition is registered in Azure AD separately:

  • KeePassium (freemium)
    • Client ID: cd88bd1f-abdf-4d0f-921e-d8acbf02e240
  • KeePassium Pro
    • Client ID: c3885b4b-5dac-43a6-af93-c869c1a8328b
  • KeePassium for Intune:
    • Client ID: 292a80b3-139a-4165-a20d-b2d2e764e538

Method 2: OneDrive/Files app integration

  1. Install OneDrive app and login into your account
  2. Open KeePassium, tap the top-right + button, then Open Database
  3. Select “OneDrive” in the Locations list (if you don’t see it in the list, make OneDrive visible)
  4. Select your database file
  5. That’s it!

Troubleshooting the integration

OneDrive is restricted by corporate IT policies

This is the root cause for most of OneDrive-related issues. It applies when you have the Microsoft Intune app installed, or a OneDrive for Business account added to your OneDrive app. (Even if the database itself is stored in a personal OneDrive account.)

Personal and business accounts

Corporate restrictions apply to the whole OneDrive app. So if you have both a business and a personal OneDrive account, they both will be affected by the corporate limitations.

There are two possible workarounds:

OneDrive is not listed as a storage location

There are two possibilities:

  • It might be hidden. Press the More button in the file selection dialog, then Edit, and make sure that OneDrive is turned on.
  • If OneDrive is still missing from the list above, the OneDrive app might be restricted by your company’s IT policies.

Cannot select file in OneDrive

OneDrive folder shows “Content not available” (“Inhalt nicht verfügbar”)
Reinstall OneDrive app, then re-add your databases to KeePassium.
When you select a file, it seems to disappear
When you try to add a database from OneDrive, the file seems to disappear when you tap it. No worries, the database is still there — but your corporate IT policy does not allow accessing it from other apps, such as KeePassium. See above for possible solutions.
When you select a file, nothing happens
When you try to add a database from OneDrive, nothing happens when you select the file. The file selection dialog simply remains on the screen. This is also caused by the corporate restrictions on OneDrive app.

The requested operation couldn’t be completed because the feature is not supported

This error can happen either due to corporate restrictions or due to a random system glitch. Try to restart your device and see if this resolves the issue.

OneDrive sync stopped working after iOS update

iOS updates seem to affect offline caching in OneDrive. As a result, a perfectly working KeePassium starts freezing when trying to access a database in OneDrive.

To fix this, open device settings, scroll down and select OneDrive. Then, toggle the Clear Account Settings switch. This will clear the cache and reset your installation of OneDrive. You will need to login to OneDrive again, and re-add your database to KeePassium.

SharePoint site not listed

If you see your SharePoint sites in the OneDrive app, but not in KeePassium’s file selection dialog — make sure to follow the specific SharePoint site. This will make the site available in all apps.

See also

Last Updated: 2023-05-12