How to block synchronization of certain file types in OneDrive Sync
In this article, I want to explain how you can easily block certain file types from being synchronized by your users via OneDrive Sync. It is a setting available within a SharePoint Admin Center, and it might prove beneficial in certain use cases. Let me explain.
What is OneDrive Sync?
OneDrive Sync is an application that allows users to sync their OneDrive for Business and SharePoint Document Libraries locally to their computers. I explained this wonderful capability in greater detail here.
Why would you want to block the sync of certain file types?
By default, users can sync any files to SharePoint. However, you might want to block some file types. There might be several reasons for blocking certain file types.
- Security – You might want to prevent, say, executables (.exe files) from being uploaded to SharePoint Online since they might carry computer viruses or corrupt the system.
- Large file types – sometimes, you might want to enforce just the Office file types/collaboration in SharePoint/Teams and do not want to allow files that might take lots of storage (i.e., CAD files).
How to block synchronization of certain file types in OneDrive Sync
- Click on Microsoft 365 App Launder > Admin
- Under Admin centers, choose SharePoint Admin Center
- Click Settings, then Sync setting next to OneDrive
- Check the box next to Block upload of specific files types
- Type in the file extension(s) for the file types you want to block from syncing. One file type per row. In my case, I just want to block the dwg (AutoCAD) file type. Click Save.
- You might need to wait up until 8 hours for this to take effect
Experience for the end-users
- Once this takes effect, users will start seeing warning messages and notifications next to the OneDrive Sync Cloud icon. It might say something like: Item name is not allowed in cloud.
- And, of course, they will see a detailed log of error messages once they click on the OneDrive Blue Icon.
- Once users open their OneDrive and Libraries in Windows Explorer, they will see the detailed Status of which files synchronized and which ones did not.
Important Notes
- According to Microsoft, it takes about 8 hours for Admin Settings to take effect (though in my case, it just took 1-2 hours)
- Very important, this does not prevent users from uploading “blocked” files to SharePoint via other means (i.e., Upload button on a document library or simply drag and drop)
- If the “blocked” files exist in SharePoint, they will still be downloaded to Windows Explorer via OneDrive Sync. They just cannot be uploaded to SharePoint via OneDrive Sync.