Mass renaming of iOS devices, enrolled via DEP

St0rMl0rD
Contributor III

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!

18 REPLIES 18

davidacland
Honored Contributor II

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.

St0rMl0rD
Contributor III

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.

davidacland
Honored Contributor II

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.

wdpickle
Contributor

We use the automated naming when we bring them in our format is BPS-SerialNumber (BPS is our K-12 district initials)c0bac912cac64f1ca246296335aa836c

St0rMl0rD
Contributor III

@wdpickle where is this screenshot from? I don't see this option in our JSS Mobile Devices area.

wdpickle
Contributor

In the prestige enrollment policy under mobile devices we are using 9.61

St0rMl0rD
Contributor III

@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.a22f5a26ab664921b6661be2e69929cd

wdpickle
Contributor

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.

St0rMl0rD
Contributor III

@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.

wdpickle
Contributor

Sorry for the delay (we are setting up graduation streaming for our high schools today)96e0a82851b448fd8d793c18a2031739
b7aefdfafe524080afee2cbabd9410cf

bcampbell
Contributor

@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).

wdpickle
Contributor

The 3 options I have (available) are:
1 Default Names
2 Serial Number with a prefix or suffix
3 List of names

gregleeper
New Contributor

@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.

St0rMl0rD
Contributor III

@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.

lcopeland
New Contributor

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?

brandonusher
Contributor II

@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?

jay216
New Contributor II

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?

Jasonz
New Contributor

I have a script for renaming the iPads by checking the csv file which requires cable connection.