Maintaining user accounts in Jamf Pro can be daunting if you work in Education. Depending on the size of your district, you may have over a thousand staff and students enter and exit within a three-month span each school year. If your district is one-to-one, that’s a thousand new user accounts getting created each year. If you aren’t doing user-based app assignments, maintaining users may not even occur to you, but there are benefits to cleaning up user accounts in your Jamf instance.
If your Jamf instance is on-premise, you know an integral part of the instance is the database. If your instance is in the cloud, you may not be aware of the significance of the database. With any database, it’s important to keep it healthy. By healthy, I mean stable, efficient, and secure. Bad data in a database can lead to inaccurate reports or, in the case of user base app assignments, wasted app licenses. Bloated databases can result in poor performance or the need to continually tune your Jamf instance to keep it stable and running efficiently.
As a rule, I typically run this user maintenance process two to three times a year. It’s very simple to do and doesn’t take much time. If there are a large number of users that can be deleted, processing time can take longer, but you don’t have to sit idle while the process is running. Let’s get started.
To begin, create a Static User group. I called mine "User Delete", but you can name it anything you want to. You’ll only need to create the group once and it can be reused as needed.
Next, create a list of users who aren’t assigned a device. In Jamf, search for all users and then export the results to a .csv file. Open the exported file in Excel or another spreadsheet app and sort the sheet by mobile devices and then computers. Delete any users from the list that have a device assigned to them, then delete all columns except for the username column and save the file.
The next step is to add the users to the static group you created using The MUT. If you aren’t familiar with The MUT, I highly recommend you check it out on Jamf Marketplace. I’m not going to get into the process of using The MUT in this article, but I can tell you if you’ve never used it, the documentation is excellent.
Before we delete the users, it’s a good idea to review the list of users that we’ve added to the static group. Since we are going to be permanently deleting these users, you’ll want to be sure that we aren’t deleting any users that you want to keep. Since these users weren’t tied to any devices, it should be relatively safe, but it’s always a good idea to be sure.
Finally, delete the users. Once the users have been uploaded to the group, go back into Jamf, view the contents of the group, select Action, then Delete Users, and click Next to confirm. That’s it! I want to say there is no step three, but in this case, there is. Even so, taking the time to do this a few times a year will result in improved performance and stability of your Jamf instance.