Update and future proof DDM support logic

This commit is contained in:
Zack T
2024-02-07 18:24:40 -07:00
parent 535209a5b9
commit fcbc76e5e4

View File

@@ -190,11 +190,11 @@ SELECT
), "True", "False"
) AS "Failed to Renew MDM Profile",
IF(mobile_devices_denormalized.is_supervised = 1, "True", "False") AS "Supervised",
IF(
mobile_devices_denormalized.declarative_device_management_enabled = 1
and mobile_devices_denormalized.os_version LIKE "16.%",
"True", "False"
) AS "Declarative Device Management",
CASE
WHEN mobile_devices_denormalized.declarative_device_management_enabled = 1 THEN "True"
WHEN mobile_devices_denormalized.os_version REGEXP "^([1-9]|1[0-5])\.[.\d]+$" THEN "Not Supported"
ELSE "False"
END AS "Declarative Device Management",
IF(mobile_devices.user_removed_mdm_profile = 1, "True", "False") AS "Missing MDM Profile",
IF(mobile_devices_denormalized.mdm_profile_removable = 1, "True", "False") AS "MDM Profile Is Removable"
FROM mobile_devices