Excluded File Extensions in OneDrive Personal
Excluding files in the sync from a device to the cloud is not new. For OneDrive for Business, I wrote about this first on 11/18/2020 and then again on 11/23/2020. This is a group policy that the user cannot influence. The principle has not changed but it is now shown to the user in the settings:
Open OneDrive for Business and go to Settings > Sync and Backup > Advanced Settings. Figure 1 shows the user that all files with the extension LNK as well as all files with the name Text.txt are not synchronized to the cloud. But only all newly added files. The user has no way to change these restrictions made by IT. That's nice because the user had no other way to retrieve these settings himself. But is that all? It turns out, no.
So Why Write a New Article After 2.5 Years?
I overheard in passing that the product team was continuing this work. I knew since the MVP Summit in April 2023 that the product group was working on something similar for OneDrive Personal. Unfortunately, the high clock rate of OneDrive versions without information makes it impossible to test anything if you don't know what to test. I know that in version 23.101.0514.0001, this display was not seen yet. But in version 23.109.0523.0001 it is there.
Let's switch to OneDrive Personal.
In Figure 2 I have entered several file extensions here as a user. While the entries in OneDrive for Business can be a wildcard sequence of file names and file extensions, OneDrive Personal only permits the user to enter file extensions. They also only take effect on the respective device. Entries of OneDrive for Business are stored in the registry, the entries of OneDrive are stored in the user directory under the filename odignore.txt:
C:\Users\[Username]\Appdata\Local\Microsoft\OneDrive\settings\Personal\odignore.txt
However, we see an entry that cannot be deleted or modified by the user. This comes from the group policy entry named Exclude specific kind of files from being uploaded from the device configuration.
This Group Policy allows you to enter keywords to prevent the OneDrive synchronization application (OneDrive.exe) from uploading certain files to OneDrive or SharePoint. You can enter full names, such as "setup.exe", or use the asterisk (*) as a wildcard for a series of characters, such as *.pst. Keywords are not case-sensitive.
If you enable this group policy, the sync app will not upload new files that match the keywords you specify. No errors are displayed for the skipped files, and the files remain in the local OneDrive folder. In File Explorer, the files are displayed with an "Excluded from sync" icon in the status column. The OneDrive sync app must be restarted after enabling this setting for the setting to take effect.
Bypass the Exclusion With a Web Browser
Users can still view their OneDrive in a web browser and they can use the browser to upload an excluded file from their local OneDrive folder to OneDrive. I recommend that users remove the local file after this process, as a file with the same name in the same folder may cause a sync conflict with the skipped file.
If you disable or do not configure this setting, all supported files in all synchronized folders will be uploaded.
Now go back and review Figure 2 and note where I have numbered two items in red. Office files (i.e., file extensions from Office such as pptx, docx or xlsx) can be entered, but the sync application skips this exclusion. The background to this is that the desktop variants of these Office programs can communicate directly with the cloud. Microsoft has not changed this inner logic.
Summary
I advise every company not to use OneDrive Personal in the company. This is because administrators cannot prevent business documents from being shared with external parties via OneDrive Personal. For that, there is a group policy that excludes synchronization with OneDrive Personal.
On the other hand, there are millions of devices running OneDrive Personal and here Microsoft has now created a simple way to exclude files with certain file extensions from synchronization. For example, games: Files that store configurations, game scores or high scores will not need to sync with the cloud. This is exactly what Microsoft has now made possible.
Vison and Wishes
I showed the illustration on a slide during my talk at aMSBerlin and had a small discussion with an attendee that moved me to add this addendum. Microsoft should take what exists as a group policy for OneDrive for Business and put the same logic in OneDrive Personal:
- Extension around filenames.
- Extension around wildcards.
- Simplify the issue of Office files.
Related Link