DEPNotify-Starter pre-fill Departments and Buildings

aburrow007
New Contributor

I've included a command in the DEPNotify-Starter script which using API's connects to the server and pulls down Departments the script itself appears to work fine, checking the logs it is pulling down the Departments correctly, I'm unsure how to display the contents of that variable within DEPNotify using the DEPNotify-Starter script, so the users can select from a drop down list.  If/when I can get this working I plan on doing the same for Buildings.

Thanks

2 REPLIES 2

mm2270
Legendary Contributor III

Yeah, this is possible to do. I could swear I already posted some basic code on how to do this on another thread that was asking something similar, but I'm having some trouble locating that discussion at the moment. If I find it, I'll point you to it so you can see how I've done it myself (not currently using it, but was done for another customer/position)

The basic idea is to first assign all Departments or Buildings or whatever it is you pulled via the API into a bash array. Then at the stage where you are populating the menu.nomad.DEPNotify.plist file that controls the DEPNotify Registration UI, you loop over the array for Buildings or Departments, and for each item, add it into the plist using the -array-add syntax.

GabeShack
Valued Contributor III

@aburrow007 Also if you have your users syncing with AD or Azure, I'm pretty sure you can have JAMF auto populate the Department/Building based on the user assigned to that device which would happen during a recon.  But that may require the Jamf Infrastructure Manager plus syncing the values for those fields with Jamf.

Gabe Shackney
Princeton Public Schools