logoalt Hacker News

jeroenhd11/04/20251 replyview on HN

I tried to find the correct API for getting the current MDM enrollment status on macOS but I can't find anything other than people suggesting command line tools. Unless you're an MDM application yourself, I don't think there is an official API.


Replies

breppp11/05/2025

The Windows API was very easy to find. Generally if he can call an executable that can fetch that MDM status, it is almost certain that executable calls some function in some library to get it.

I was curious so I checked, it uses CPProfileManager and CP_GetManagementStatus, a private undocumented MacOS API. That's one hostile OS, at least Microsoft was forced by court to open its APIs