Possible to selectively choose folders to sync at set-up time of OneDrive for macOS? Question: 


Is it possible to configure through the Terminal or otherwise which folders to selectively sync in the OneDrive app for macOS?
Or, to select the folders to sync during the setup procedure of the app?


Background:

I am having trouble getting OneDrive setup on a new iMac running macOS Catalina 10.15.4. After installing the app from the Mac App Store and linking my Microsoft account, the app immediately start syncing. So far, so good. But then I have two related issues:


The app starts syncing all the content, which is about 250GB, and which is not what I want (it would drain my ISP quota). I want to exclude a certain big (Backup) folder from syncing.
However, trying to do selective syncing configured, I bump into the spinning beachball when trying to adjust the OneDrive settings. It's almost impossible to get to the correct setting; but if I get there and uncheck the relevant folders I get a popup from Onedrive telling me it can't do it because of some content that first needs to be uploaded. (don't have a screenshot right now, as it's hard to reproduce).


Unfortunately, when setting up OneDrive, there is no option to specify what folders to sync. (Dropbox, for instance has such a feature).

So, is there any way for me to reliably set the folders to sync with OneDrive, without having to download the full 250GB of my OneDrive folder?

BTW, I have the OneDrive app running successfully on an older iMac; but I think that was already setup before I started backing up to OneDrive.
I have run into and struggled with the exact same issue with setting up OneDrive app for macOS. Here's what I have observed setting it up on multiple personal Macs.

Soon after logging into the app, it appears to start syncing all the files and folders, and trying to access the app preferences result in a spinning beachball. While it appears that the app is trying to download all the data from your OneDrive cloud storage, in reality that's not the case.

What's happening is that the app is fetching the metadata for all the files on your cloud storage without actually downloading the files themselves. I have experienced this process to take unusually long time, thereby giving an impression that it's trying to download all the files.

Also, the app by defaults comes configured with a setting called Files On-Demand enabled. Here's how it looks like in the app preferences window:



What this does it gives you an impression that all the files and folders are available in Finder. However, when you try to access any by trying to copy or open, the app actually starts downloading the file. The Finder simply shows the file icon normally and even trying to perform a Quick Look triggers a download.

In my experience, the app is programmed such that the app preferences are not accessible until this initial fetching of metadata is complete. But as soon as this initial fetching of metadata is complete, the app preferences become accessible, and then you can choose the folders to sync selectively. If you get an error when trying to select some folders and save, try relaunching the app.

Once you have selected the desired folders, you may also want to turn off Files On-Demand. Doing so would actually download the files for the selected folders and would even let you work with them in offline mode.

I find this feature of the app very annoying. Also, I feel that the overall UX of the app is very confusing and frustrating. You can consider sharing feedback on this with Microsoft here: OneDrive on Mac - Feature Suggestions for Microsoft OneDrive.

Now to address your specific queries:


  
  Is it possible to configure through the Terminal or otherwise which folders to selectively sync in the OneDrive app for macOS?
  


I can't conclusively answer this in no, but there aren't any publicly known command-line that can do this.


  Or, to select the folders to sync during the setup procedure of the app?


I have not found this feature present in the current version of the app.