Posted on 06-26-2017 08:13 AM
I have a slew of mobile device apps that I need to switch from "Install Automatically" to "Make Available in Self Service." I was hoping that there was a way I could do so without having to touch every individual app. Has anyone here encountered this problem before, and more importantly, found a solution?
Posted on 06-27-2017 07:20 AM
If you're self hosted you should be able to make this change in the MySQL database with a custom query. I'd run it by your Jamf Buddy first of course.
Posted on 06-28-2017 06:04 AM
Yeah, that's what I was thinking, but I don't like to muck about in MySQL w/o JAMF approval, so I checked w/ chat support, who suggested I bring the question over here. I'll open a support case w/ my JAMF Buddy and see where that goes. Fingers crossed!
Posted on 06-28-2017 06:07 AM
I'd advise against doing it in the database, but you can make the change using the API. You'll need a CSV list of apps, with the names exactly as they appear in the app catalog. You're changing the deploy_automatically attribute from true to false. I'll include a basic version of the script below.
#!/bin/sh
TARGET = /Path/to/list.csv
cat $TARGET | while read NAME; do
curl -sk -u username:password -H "Content-Type: text/xml" -d "<?xml version="1.0" encoding="ISO-8859-1"?><mobile_device_application><general><deploy_automatically>false</deploy_automatically></general></mobile_device_application>" https://your.jss.url:8443/JSSResource/mobiledeviceapplications/name/$NAME -X PUT
done