update email address user field from Google Sheet

chrisdaggett
Contributor II

Thought I would share in case anyone else has a need. Simple script that pulls down the Google sheet, looks for matching serial # of the device, and if found does a Jamf recon update with the matching email address to update the user email address field.

We have deployed Securly for home filtering, which if you have setup with their "injector" you can pull the email address from JAMF during deployment of the Proxy/SSLCert Configuration Profile so that the user doesn't have to authenticate. I have the Configuration profile scoped to student devices that the email field is not blank (with another config profile without the injector scoped to machines without email, so those users will have to authenticate).

I was already using a modified version of the script shared on Jamf Nation to set computer names from a Google Sheet, so I made a new script using a similar manner (all bash, no python) to update the email Field from the same Google sheet principle. (I have both the Google Renamer sheet and the Google Email sheet pulling their data from my master sheet, that way I'm not actually sharing my master sheet)

This assumes the google sheet used here has 2 columns, serial # and email address. You replace the INSERTIDHERE with the ID from your shared Google Sheet.

Deleting for now, was getting some odd line endings and don't want anyone else running the code until I have cleared it up.

0 REPLIES 0