Hi,

I'm writing a little java web app to handle user's password update through 
APIs.

I think the code I wrote is correct... I mean, the procedure works properly 
and passwords are updated.

What's wrong, then?

Well, I've created a couple of test users with a temporary password and 
passwords were correctly marked as "temporary" in the domain management UI.

Then I tried to update the users' passwords using my web app. I think it 
worked, because users have now to use the new passwords' values in order to 
sign in.

*** BUT *** when I last visited the domain management UI, I noticed that 
the value of the marker/label (what do you call that field?) "temporary" 
was unchanged! I expected a new value for the marker/label (i.e. "set by 
admin").

This is the significant snippet of code (Java):

[...]

String domainUrlBase = 
"https://apps-apis.google.com/a/feeds/<mydomain>/user/2.0";

UserService userService = new UserService(serviceName);

userService.setUserCredentials(adminEmail, adminPassword);
URL retrieveURL = new URL(domainUrlBase + "/" + username);
UserEntry userEntry = userService.getEntry(retrieveURL, UserEntry.class);

userEntry.getLogin().setPassword(newUserPassword);

userService.update(retrieveURL, userEntry);

[...]

The question is: how can I modify the value of the marker/label "set by 
admin | set by user | temporary", according to the update operation made by 
my app? I'd like to set the value to "set by admin".

I also thought that I had to set something more, but I didn't find anything 
useful (userEntry.setUpdated(...)?, ...?). 

Other question: when a user is created through APIs the value of the 
marker/label is "set by user" by default. Why?

Thank you!



Emilio

-- 
You received this message because you are subscribed to the Google Groups 
"Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-apps-mgmt-apis/-/mAMlfcFgGvgJ.
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-mgmt-apis?hl=en.

Reply via email to