Skip to main content
Question

MDM enrollment email Terminal command

  • June 4, 2025
  • 1 reply
  • 6 views

userjamf
Forum|alt.badge.img+3

Hello everyone,

Is there a Terminal command to retrieve the email address used during MDM enrollment ?

Context: I need it to automate the GLPI agent configuration, where the entity assignment is based on the user’s email.

1 reply

feszg
Forum|alt.badge.img+6
  • Jamf Heroes
  • June 4, 2025

Does it have to be the user who enrolled the device?

Fairly certain the user in user and location is defaulted to the user who enrolled the device, you would need to use the API to pull those records in a programatic fashion. Which is likey best done on a dedicated machine and not your Mac fleet, but anyways.

I wrote this, this will grab the current logged in user and append your company email and store the email as a variable.

#!/bin/bash loggedInUser=$(whoami) email="${loggedInUser}@yourcompany.com" echo $email