Releasing Jamf licence for lost mobile devices

dmlasd
New Contributor II

Sending the Enable Lost Mode, Lock Device, Wipe Device or Unmanage Device commands do no good if the mobile device is not checking in with Jamf.  Until it checks in (which may be never), it continues to use a Jamf license.  I don't see a way to release the Jamf license without deleting the record from Jamf, which I'd rather not do (as then we no longer have a record of the device).  Or am I missing something?

 

1 ACCEPTED SOLUTION

dmichels
Contributor II

That's exactly it. If the device is not turned on, it will never receive the alert unless it checks in with Jamf Pro, which it remains a computer record and takes up a license. Which is not a big deal, you pay annually for licenses, so it doesn't really matter if you just leave it alone until the device shows up. 

If you decide device is missing and  you are writing it and removing it from your inventory. If you are doing that, then you can just delete it.

One other thing if you want to keep it around but delete it from Jamf Pro and get license back. Delete computer record in Jamf Pro. and just leave it in Apple School or Business Manager, whichever you use. Therefore, if you set it up to get a Pre-Stage Enrollment if the device ever turns on it will show up again in your Jamf Pro, and not use a Jamf Pro  license until it does. 

View solution in original post

3 REPLIES 3

dmichels
Contributor II

That's exactly it. If the device is not turned on, it will never receive the alert unless it checks in with Jamf Pro, which it remains a computer record and takes up a license. Which is not a big deal, you pay annually for licenses, so it doesn't really matter if you just leave it alone until the device shows up. 

If you decide device is missing and  you are writing it and removing it from your inventory. If you are doing that, then you can just delete it.

One other thing if you want to keep it around but delete it from Jamf Pro and get license back. Delete computer record in Jamf Pro. and just leave it in Apple School or Business Manager, whichever you use. Therefore, if you set it up to get a Pre-Stage Enrollment if the device ever turns on it will show up again in your Jamf Pro, and not use a Jamf Pro  license until it does. 

dmlasd
New Contributor II

OK, thanks for the confirmation!

It's too bad there is not a way to Unmange mobile devices that are not checking in and keep the record in Jamf.  That is an option with computers.

kevin_v
Contributor

Would anyone care to help me test this script out and report back?

#!/bin/bash
#Unmanage mobile devices from a CSV file via Jamf API

#Server Information
server="url"
APIusername="username"
APIpassword="password"
CSV="filepath"

# Count entries in CSV
count=`cat ${CSV} | awk -F, '{print NF}'`

# Start the count
index="0"

# Loop through the entries and set unamanged
while [ $index -lt ${count} ]
do
	index=$[$index+1]
	
	var=`cat ${file} | awk -F, '{print $'"${index}"'}'`
	
	curl -ksu "$APIusername":"$APIpassword" -H "content-type: application/xml" "$server"/JSSResource/mobiledevices/serialnumber/$var -X PUT -d "<mobile_device><general><managed>false</managed></general></mobile_device>"
done

exit 0