Coming up to the end of a school year you may find yourself needing to bulk delete the Google Apps user accounts for your school (or district) domain for students that are moving on from your school. That is, if your district hasn't implemented automatic provisioning.
I've written a little script to help automate this process, everything you need is included in this zip file.
To bulk delete users from your domain:
- Enable the Provisioning API for your Google Apps domain (log in with your admin account at http://google.com/a/yourdomain , click the Users and groups tab, then the Settings subtab, select the checkbox to enable the Provisioning API, and save your changes).
- Unzip the his file that you downloaded by right clicking the downloaded file and choosing Extract All...
- Edit the text file named deleteaccounts.txt so that it contains each unwanted user account on its own line. You can likely get information for this from your student information system.
- Run the program GoogleAppsDeleteUsers.exe .
- The program will ask you for your Google Apps domain, administrator account, and password. Don't worry, it doesn't write these to a file or email them to anyone.
- Watch as the user accounts are slowly deleted one by one without you having to do anything else.
Since you shouldn't just run programs downloaded from people you don't trust, I've also made the source code available. It's written in Python 2.6, depends on the Google Data Python Library, and compiled for Windows with py2exe. Feel free to improve on it or reuse it. This is my first foray into Python, and I am indebted to jay0lee for some of the ideas in his Google Apps Manager.
Edit: Before deleting users, you may want to direct them to our post on Downloading Your Google Sites.
Edit: You can also check out a web-based version that I put together.