Posted on 05-15-2015 01:33 AM
Hi everyone,
So, as we're switching to DEP for iOS devices in our organization this summer, I am thinking about the workflow, and I just realised that all the new iPads will enroll to JSS and show up with just "iPad" as their name. That means we'll have to go in and manually rename those devices. Is there a way to automate this? We'd have names of devices, their asset tags and serial numbers in an Excel or a CSV file.
Thanks!
Posted on 05-15-2015 01:56 AM
You can do this via the API, using a script with curl to find the iPad by the identifier (this would need to be something in the JSS already like the serial number), then upload the new name based on the CSV file data.
If you've gone that far you might as well upload the asset tags and any other info you need at the same time.
Posted on 05-15-2015 02:21 AM
I don't have any experience with the API so this might be a little tricky...Well, I'll see how far I can get.
Posted on 05-15-2015 02:51 AM
Ah ok. There's some good information and examples if you search keywords like "jamf casper api" etc. This one is good: https://bryson3gps.wordpress.com/2014/03/30/the-jss-rest-api-for-everyone/.
The approach I would take is a loop to read through the CSV, line by line, executing the necessary curl commands as it goes.
Posted on 05-15-2015 05:42 AM
We use the automated naming when we bring them in our format is BPS-SerialNumber (BPS is our K-12 district initials)
Posted on 05-15-2015 05:56 AM
@wdpickle where is this screenshot from? I don't see this option in our JSS Mobile Devices area.
Posted on 05-15-2015 06:32 AM
In the prestige enrollment policy under mobile devices we are using 9.61
Posted on 05-15-2015 06:34 AM
@wdpickle have a look at my screenshot, we don't have this. Does it only appear after the DEP is set up? Ours isn't set up yet.
Posted on 05-15-2015 06:51 AM
Must be. We set up the prestige enrollment immediately after we got DEP setup for testing. And decided the -serial number was the best setup for us.
Posted on 05-15-2015 08:11 AM
@wdpickle can you just do me a quick favor and see if the fullname is also an option there for setting the name? We set the names of the devices with full names of users from LDAP, then enforce them.
Posted on 05-15-2015 09:00 AM
Sorry for the delay (we are setting up graduation streaming for our high schools today)
Posted on 05-15-2015 11:43 AM
@St0rMl0rD I was looking for a way to force the iPad name to something with the users name it it, but it does not look like that is supported. The "List of Names" option is the only choice other than serial number and it indicates that a list of names is required. I'd love someone to tell me I'm wrong, but I believe the list of names is a static list not something that can pickup and be set from another field like the username.
We actually get the username when setting up with DEP, but I'd like to be able to Enforce it and that checkbox seems only available when selecting "Serial Number" or "List of Name".
@davidacland do you happen to know if you could set the name via the API, but still have "Enforce Mobile Device Names" enabled under PreStage Enrollment (with it set to Serial Number for example) such that the name set via script and API would be what is enforced when the device is in production (and users can then change the name) as opposed to say the Serial Number? In other words, if Enforce is enabled, will the API still allow the device name to be changed and will the enforcement apply to whatever the Device name is set in JSS (as opposed to what is on the iPad).
Posted on 05-15-2015 12:24 PM
The 3 options I have (available) are:
1 Default Names
2 Serial Number with a prefix or suffix
3 List of names
Posted on 05-15-2015 12:33 PM
@St0rMl0rD you can enforce naming of supervised devices only. When setting up or editing a prestage enrollment, make sure Supervise Devices is checked, and you will then be given the option to enforce a naming convention of mobile devices within that prestage enrollment through DEP.
I wish this option was available with OS X but I don't think it is.
Posted on 05-18-2015 12:04 AM
@gregleeper are you talking about naming the devices in the DEP portal? I know about forcing the name only being available for supervised devices in JSS.
Posted on 06-12-2015 11:30 AM
We use DEP and chose serial number for the device name. Enforce naming convention is not checked. However, we can not go back into JSS and change that device name. @bcampbell how do you get the user name in DEP?
Posted on 06-13-2015 01:27 PM
@lcopeland If you have "Require Authorization" checked in the PreStage it pulls that users information into the user and location information fields from ldap
@St0rMl0rD Are you still seeking a solution to the naming and enforcing a name on the iPad?
Posted on 09-15-2017 04:02 PM
Did anyone find the Curl command to rename ios devices. I am currently in need of a script to rename a mass amount of ios devices. We are unable to use the MUT application unfortunately which is why i need to script it. Any help would be greatly appreciated. Maybe someone already has the script?
Posted on 05-17-2018 04:58 PM
I have a script for renaming the iPads by checking the csv file which requires cable connection.