Renaming an account via python API

14 views
Skip to first unread message

Kua

unread,
Feb 6, 2012, 5:13:39 PM2/6/12
to google-app...@googlegroups.com
Does anyone have any sample python code that they could post that renames an account?  In particular, I am interested in
seeing how the UserEntry object needs to be modified for a sucessful rename.

Thanks, Kua

Chet

unread,
Feb 6, 2012, 5:41:14 PM2/6/12
to Google Apps Domain Information and Management APIs
Very simple example:

# retrieve
user_entry=apps_service.RetrieveUser(username)
# set new username
user_entry.login.user_name=new_username
# if new frist and last:
user_entry.name.given_name=new_givenname
user_entry.name.family_name=new_familyname
# update
apps_service.UpdateUser(username, user_entry)
Reply all
Reply to author
Forward
0 new messages