Search code examples
iosprofilemdmblacklist

iOS mobileconfig - application blacklist / whitelist?


I am using Profile Manager from OS X Server as an MDM.
I managed to configure everything, but still one thing remains, and I cannot seem to find any options for it.

Is it possible to create application blacklist (or whitelist) when creating .mobileconfig for an iOS device?

The only thing I found would be to use Single Sign-On payload and use "Limit this accound to specific apps" but it seems like an aweful idea, even if it would somehow work.


Solution

  • I managed to do this by accessing Profile Manager's PostgreSQL database and retrieving a list of apps for users, then comparing it to my applications blacklist, and finally, sending emails to all users who have blacklisted apps installed on their devices.

    You can access Profile Manager's Database on OS X by typing:

    sudo psql -U _devicemgr -h /Library/Server/ProfileManager/Config/var/PostgreSQL -d devicemgr_v2m0
    

    I wrote my script in Python, but it can be just as easily written in PHP or other language. Hope that helps someone.

    My script runs once a day and does several things:

    1. Accesses a database
    2. Queries users, their emails and their apps by joining 3 tables (users, devices, installed_ios_applications)
    3. Sends an email to every user whose apps contain any application from my blacklist.