Created
January 9, 2011 17:12
-
-
Save colinramsay/771820 to your computer and use it in GitHub Desktop.
Change the username of one or more Google Apps users in your domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gdata.apps.service | |
service = gdata.apps.service.AppsService(email="admin@mydomain", domain="mydomain.com", password="password") | |
service.ProgrammaticLogin() | |
names = {'from':'to'} | |
for current, change_to in names.iteritems(): | |
user_entry = service.RetrieveUser(current) | |
user_entry.login.user_name = change_to | |
service.UpdateUser(current, user_entry) | |
print user_entry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment