Dynamically Assign a Device based on logged in user UPN

Eigger
Contributor III

Is there a way to dynamically assign a device based on the current logged in user for use with Apple Classroom for Student mac or for any purpose thereof using the API?

3 REPLIES 3

hkabik
Valued Contributor

You don't even need to use the API.

Decide how you want to grab the user to assign it to ($Username in the below command) and run:

/usr/local/jamf/bin/jamf recon -endUsername $Username

JustDeWon
Contributor III

@Eigger, in order to do what @hkabik suggested, you also need to make sure that Collect user and location information from LDAP is checked.. This can be enabled by navigating to Computer Management>Inventory Collection in the JSS Settings.

Eigger
Contributor III

Nice! good to know, will test and report back. Thank you both!