I recently got myself preowned s10e sm-970u1 and faced issue described here:
Done some prerequisites of checking root and Knox bit. All root checker apps I used says not rooted. Accessing download mode shows Knox warranty bit is 0x0.
Went ahead with wiping cache. Didn't work. So done factory reset still no good. Proceeded with flashing a latest OS manually using Odin.
Before, phone had Android 10.
I've flashed Android 11 using HOME_CSC.
Issue still persists.
So I've reflashed it using CSC (clean flash).
Booted phone, while going through the usual setup procedure, on "checking details" screen, below error pops up.
"Can't create work profile - The security policy prevents the creation of a managed device because a custom os is or has been installed on this device."
OK is the only button available in popup and I click on it, momentarily, same popup reappears.
I'm not able to proceed with setting up the phone and am stuck at setup.
In case anyone else has this issue: I bought a used Galaxy S10 with the same problem, the phone had previously been enrolled in the Knox Cloud Service by an MDM. The phone came with Android 10 installed, I flashed Android 11 onto it with Odin & that's when the error appeared. By downgrading the firmware back to Android 10 I was able to use the phone but wasn't able to use the built-in software updater (error: "registration failed") so I'll be stuck with Android 10 & January 2021 security updates, but at least the phone works.
Originally: Android 11 G973U1UEU4FUA4 / G973U1OYM4FUA4
Downgrade to: Android 10 G973U1UES4ETL1 / G973U1OYM4ETL1
Avoid flashing a newer bootloader version unless you're 100% certain you've tried every option because you can't downgrade later. I was able to stay within version 4.
I tried flashing: Android 11 (error during setup) -> Android 10 (completed setup) -> Android 11, which allowed me to complete the setup without connecting to the internet however a few minutes after connecting to a wifi network I received the error ""this phone is controlled by XXX and needs to be enrolled using Knox Mobile Enrollment." I cut my losses and went back to Android 10 rather than risk bricking my phone.