Posted on 09-29-2015 07:36 AM
Has anyone been able to assign users to a computer via API I am having trouble navigating the API docs. I want to use cocoadialog to prompt our techs to enter a userID and then assign the mac to that user.
Posted on 09-29-2015 08:13 AM
What I do is have a policy that's scoped to all computers, but limited to our technicians' LDAP group. When the user is logged into the computer, the technician logs into self service and runs a policy with this script:
#!/bin/sh
# get the last user that logged into the computer
lastUser=`defaults read /Library/Preferences/com.apple.loginwindow lastUserName`
# echo the last user's username so it's in the policy log for error checking
echo "$lastUser is last user"
# submit inventory for the last user's username in the JSS
jamf recon -endUsername "$lastUser"
Posted on 09-29-2015 08:16 AM
Thanks @jbourdon but since our JSS talks to our service desk system I need this to happen during initial setup
Posted on 09-29-2015 08:26 AM
@RogerUL Can you be more specific on what it is you want with this? Where are you looking to assign the user to the computer? In the User and Location details?
Posted on 09-29-2015 10:57 AM
@mm2270 yes exactly
Posted on 09-29-2015 11:09 AM
Have you tried using the check box of "Collect user and location information from LDAP" from here? https://jss.vcpusd.k12.ca.us:8443/inventoryCollection.html?id=0&o=r
Posted on 01-24-2017 08:38 AM
Was any progress ever made with this? automating the process with the API?