Jon,

Looks like you are setting the last name of the user to your new password
with this line.

entry.Name.FamilyName = newpass;

If this code is Java and not .net then this would set the password

entry.getLogin().setPassword(newpass);

George

On Thu, Mar 26, 2009 at 8:56 AM, Jon <[email protected]> wrote:

>
> I am trying to use the UpdateUser method to reset passwords for users
> in my google apps....
> Here is what i have:
>
>       public string resetPassword(string username, string newpass)
>        {
>            AppsService service = new AppsService(domain, adminEmail,
> adminPass);
>            string response = null;
>            string result = null;
>
>
>            try
>            {
>                UserEntry entry = service.RetrieveUser(username);
>                entry.Name.FamilyName = newpass;
>                entry = service.UpdateUser(entry);
>                result = entry.Name.FamilyName;
>            }
>            catch(AppsException ex)
>            {
>                response = "::" + ex.ErrorCode + "::" +
> ex.InvalidInput + "::" + ex.Reason + "::";
>                worker.logThisStuff("gResetPassword :", response);
>                result = ex.Reason;
>
>            }
>            return result;
>
>        }
>
> When I execute this it does not throw an exception for failure,
> however it also does not set the password. Any insight on what I might
> be doing wrong would be appreciated.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to