How to use Password Agent with Microsoft OneDrive

This document helps you set up OneDrive on Windows, so you can synchronize Password Agent files between different devices. If you have a recent version of Windows 10 or 11, you likely already have OneDrive installed and also have a Microsoft account, which is required to use OneDrive. If not, you can create a new account or use Google Drive instead.

Before continuing, make sure you have read the introduction to cloud sync with Password Agent, so you know what can and cannot be achieved.

Set up OneDrive on Windows

OneDrive is pre-installed by default on Windows 10/11, so you usually do not need to install it manually. If you do, you can find it on the Microsoft website.

If you have OneDrive installed, you will see the OneDrive virtual folder in File Explorer, as shown in the screenshot below.

OneDrive virtual folder visible in File Explorer

“False” file conflicts on OneDrive: As of this writing, OneDrive has an annoying issue: when a file that is open in Password Agent on Windows is updated in the cloud, and the open file is then closed in Password Agent without modification, OneDrive syncs the file from the cloud and thinks there was a file conflict, even though the file has not changed on Windows. It keeps the old version of the file with a number appended to its name, and such files can be deleted from your cloud folder (but be sure not to delete your original file).

Select the OneDrive folder to display its contents. If you are not signed in to OneDrive, a window will be shown allowing you to sign in with your Microsoft account. In the last sign-in step, you’ll see a prompt saying that this sign-in information will be available to all apps – you can limit that by pressing the small “Only Microsoft apps” button above.

OneDrive may then show the “Back up folders on this PC” screen (see screenshot below) – for Password Agent, you do not need to select any folders to back up; we will add our folder manually in the next step. Press the “I’ll do it later” button to skip the backup folder setup.

If OneDrive asks to back up folders, skip this for now; it is not needed for Password Agent

Move your Password Agent data files to OneDrive

Once the OneDrive setup has finished, select the OneDrive folder in File Explorer. This folder can be empty, or you may see your existing files/folders there.

New folder 'PWA' created on OneDrive

Create a new folder to store Password Agent files. In the screenshot above, a folder named “PWA” was created for this purpose. Of course, you can name it something like “Passwords”, but such a name attracts more attention from potential passersby than necessary.

After the new folder has been created, you can make it available offline; OneDrive will then automatically keep this folder’s contents available locally in case you lose network connectivity. Also, files load much more quickly if they are already downloaded before opening in Password Agent. Note: This setting is device/computer-based, so you need to mark this folder for offline use on each of your devices/computers where you want Password Agent files to always be available.

To make the new folder 'PWA' available offline, toggle 'Always keep on this device' in its context menu

To make the Password Agent folder available offline, right-click it to invoke the context menu, then toggle the Always keep on this device menu item to show a check mark (see the screenshot above, where the menu command has not yet been invoked). This command is an on/off toggle, so you can turn the feature on and off from the same command. If it is active, it has a check mark, and files available offline will have a solid green check mark in the Status column in File Explorer.

Now open your newly created folder and move* your Password Agent data file(s) from their current location to the new folder on OneDrive. You can skip copying any .old files, which are automatically maintained older versions of the files – these slow down syncing. You cannot move a file that is currently open in Password Agent, so close (not minimize) Password Agent before moving files. If you don’t know where your existing data files are located, please see Locating Password Agent data files.
*) Make a backup of your files first, but in the end, you need to have all files in one location to avoid a situation where you mistakenly open and use the same file from a different source and end up with seemingly identical files with different content.

Password Agent data files moved to dedicated folder on OneDrive

In the screenshot above, the solid green check mark in the Status column means the file is synced with the OneDrive server and is also available locally (offline).

Open files directly from OneDrive

Now that you have finished moving your files to the OneDrive folder, you can open your files directly from OneDrive. In File Explorer, double-click a data file residing on OneDrive to open it in Password Agent, or if you do not have a file association, open the file from Password Agent using the menu command File | Open (be sure to browse for the file in the virtual OneDrive folder).

In Password Agent, the file name is displayed on the status bar along with the last modification time (from version 2024.9.24, screenshot below). Confirm that you are using a file from OneDrive. Since you previously used file(s) from your local system, it is recommended that you now clean your old recently used files list in Password Agent; for this, use the menu command File | Open recent | Manage list | Remove all. If you do not clean it, you may accidentally re-open the wrong file (an old version) from your local system instead of the cloud drive and keep using it without noticing.

Status bar in Password Agent showing file name and last modified time -- make sure you open file(s) from OneDrive

Important! OneDrive software cannot update files that are open in Password Agent

It is important to remember that when you open (unlock) a file in the Windows version of Password Agent, the OneDrive software cannot update the open file locally if it has changed in the cloud (as long as the file is open). To get the update, you need to lock the unlocked file; the file then gets updated after some time. If you work with cloud files that are updated elsewhere, you should configure Password Agent to lock open file(s) after a period of inactivity. For this, open the program settings and change User activity timeout to 10 (minutes, default) and User inactivity action to Lock open files (default).

To know if you have an up-to-date file to open, inspect the last modification time on the Password Agent status bar (screenshot above) – if you know the file has been modified in the cloud, but you still see an older date, the local file has not been updated from the cloud. Do not edit the file until you get an up-to-date copy; otherwise, you will get a file conflict and two different file versions. If the file is open, lock it and wait until it is updated by the OneDrive software. The last modification time on the status bar is updated automatically when the file is updated.

File conflicts and reverting to a different file version

Using Password Agent with OneDrive requires some attention to avoid overwriting a newer data file with an older one. If this or some other issue, like file corruption, has occurred, you can see older file versions kept by OneDrive and also revert to an older version with minimal effort (the latter is not possible with Google Drive on Windows at the time of writing).

Note: You may see .old1, etc. files next to your data file; these are made by the Windows version only. We are trying to get rid of such files on cloud drives with an upcoming update. It is better to use OneDrive’s own means to recover an older file version, as that also includes changes made by the Android version, which does not create .old files.

Open your OneDrive folder that contains Password Agent files, right-click a file to display the context menu and choose the menu command Version history (see screenshot below). On Windows 11, you need to first invoke the Show more options command from the context menu; the additional OneDrive commands will then be visible in the context menu.

Display OneDrive file version history from file context menu

A window opens, displaying the available file versions. If you need to revert to an older version, open the popup menu under the More options button and select the menu command Restore (see screenshot below). The Restore menu item is visible only if you have selected an older version. Restoring a file replaces the current version with the restored version. The restore procedure is global and affects all devices that access the file.

Restoring older version in version history window

Note: When you change your master password due to a security concern, file versions that can be accessed with the previous password can still be found in the cloud file history, unless you manually delete them from the cloud file history.

Accessing OneDrive from multiple computers

If you have multiple computers, you can now configure the other computers to open file(s) from this OneDrive folder. Just set up OneDrive, mark the folder with Password Agent data files as available offline, then open the data file directly from OneDrive and clean the old recent files list.

Accessing OneDrive from the Android app

See the topic How to open a file from a cloud drive on Android.

Always use the latest version of Password Agent

As we continuously update and improve Password Agent’s compatibility with major cloud services, it is recommended to use the latest version of the program for best results.