Go to Settings > Security > Device Administrators , disable the MDM agent, and then uninstall it under Applications .

: Works across various Android versions and Samsung models. How to Use (General Steps)

For managed enterprise environments, Samsung recommends using Knox Mobile Enrollment (KME) for legitimate device management and enrollment. Security Warning