The question is in the title. Microsoft gives these instructions, however the part for Mac is either obsolete or just never worked (and looks unfinished to be honest). No matter which file system I format the drive to (tried exFAT / APFS / APFS (Case Sensitive)) OneDrive keeps complaining that the destination needs to be non-removable and case-insensitive:
And actually Microsoft predicted that such error might appear, giving a couple of extra steps to ensure compatibility at the very bottom of the page:
Open a Finder window on your Mac, then select Applications.
Ensure the external drive is a non-ejectable type and formatted as APFS. Learn how.
The first step does not make any sense to be honest, the second refers to Apple Documentation covering how to use the Disk Utility tool. Unfortunately this tool is not able to alter RMB bit of the device or MacOS's perception of external drive (to make it internal), so it doesn't really help.
It looks like the only viable option left is to flip the RMB bit right into the removable HDD driver, but i'd like to ensure that I'm not missing anything before implementing such a drastic change.
P.S. My mac has macOS Monterey (12.4) running.