Use the DeviceInformationController singleton class to query devices for mobile device management (MDM) information.
The class returns the listed MDM information.
Enrollment status
Compliance status
Managed status
Management type
Organizational group name
Organizational group ID
Device services URL
Single sign on status
Compromised status
Requery Method
The method queries the console, and the console sends a query command to the device to collect certain types of device information.