You may see Error Code 0x8004def4 if you are trying to use the OneDrive sync app while having the OneDrive store app installed.
The solution is to uninstall the OneDrive store app.
-
Press and enter apps:onedrive
-
Select Uninstall and follow the prompts.
Note: You won't lose files or data by disabling, uninstalling or unlinking OneDrive on your computer. You can always access your files by signing in to your OneDrive account online.