Great idea! I was just looking through my users in the JSS for VPP. It's totally full of cruft, old local junky local usernames from unmanaged Macs. Look forward to checking it out!
Awesome, you can definitely use it for that purpose, might need to tweak it a bit. Then again if those users you need to remove don't have any assets (computer,mobile,VPP,etc..) it will work right off the bat.
@qsodji forgive my ignorance but are you installing Shea's python-jss module on your JSS master and running your CRON job from there? Thank you for sharing this very useful script.
@jhbush1973 That is up to you, I have tested both. You can have python-jss installed on the JSS master and have the script also live there. Setup a con job on the same server to call the script (once a week should be good enough).
I have also tested the script from a VM that had python-jss installed on it and it worked fine.
Should you choose to keep the script on your JSS master, I would recommend using 127.0.0.1:8443 instead.
I am very happy you find it useful.
Quick update...
Added support for Slack. You can now either receive and email, output list of users to a slack group or both.
Slack integration also supports multiple channels/private groups.
Also there is now a setup script that will install all the needed modules.
@jhbush1973 I wanted to add a quick update to your question. In my shop, I have the script in docker. The whole is controlled by Jenkins which handles building the entire container with the needed dependencies and run the script. Jenkins handles all the alerting and building.