Hey All,
I'm looking to create an extension attribute that emulates the "Primary User" functionality that is available in ZENworks or SCCM.
ZENworks and/or SCCM do this based on the user that has had the most console time.
I found the following post from MarcosMunoz that kind of accomplishes this, except it does so by the user that has had the most logins, from what I can tell.
https://www.jamf.com/jamf-nation/discussions/18935/primary-user
What I'd really like to do is add up the total console time for each user and set the "User and Location" fields (Username, Full Name, Email Address) in inventory to the values for the user with the most console time (probably pulling from AD) similar to this:
https://www.jamf.com/jamf-nation/discussions/22206/last-logged-in-user-details
Is an extension attribute able to write to the "User and Location" fields in Jamf Pro?
If not, I'm thinking I could probably achieve most of this already and just do a regular 'ol extension attribute, but I'd prefer the data to be in the standard locations instead of the custom Extension Attributes section of inventory on the computer record.
I also came across this post where someone did essentially the same thing, but again it's based on the login frequency rather than console time:
https://sneakypockets.wordpress.com/2013/11/07/find-the-most-common-user-on-a-system/
Perhaps I'm just being a little too picky?
Thanks for any assistance!
Have a great day!
Jacob
