Hi Greg,

It looks like you are mixing the commands to manage users in a single-domain
environment (
http://code.google.com/googleapps/domain/gdata_provisioning_api_v2.0_developers_protocol.html#Create_Account_Example)
with those for a multi-domain environment (
http://code.google.com/googleapps/domain/gdata_provisioning_api_v2.0_developers_protocol.html#Creating_a_User_for_a_Domain
).
Assuming you are in a single-domain environment, the xml to create an user
should look like:

<?xml version="1.0" encoding="UTF-8"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"; xmlns:apps="
http://schemas.google.com/apps/2006";>
    <atom:category scheme="http://schemas.google.com/g/2005#kind"; term="
http://schemas.google.com/apps/2006#user"/>
    <apps:login userName="amclean" password="test1234" suspended="false"
changePasswordAtNextLogin="true"/>
    <apps:name familyName="McLean" givenName="Alex"/>
</atom:entry>

Please note that the email address for this user would
be amclean@YOURDOMAIN.

To update the changePasswordAtNextLogin you use:

<?xml version="1.0" encoding="UTF-8"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"; xmlns:apps="
http://schemas.google.com/apps/2006";>
 <atom:category scheme="http://schemas.google.com/g/2005#kind"; term="
http://schemas.google.com/apps/2006#user"/>
 <apps:login changePasswordAtNextLogin="true"/>
</atom:entry>

Basically, the apps:property is used in a multi-domain environment only.
Hope it helps

Claudio

On Fri, Jun 24, 2011 at 9:24 PM, Jorge Luis Mendez <[email protected]>wrote:

> Hi Greg,
>
> Interesting.  Are you using one of the API libraries or implementing your
> own? Which language?
>
>
> On Fri, Jun 24, 2011 at 3:01 PM, Greg McLean <[email protected]>wrote:
>
>> Hi.  I am struggling trying to set or update the changePasswordAtNextLogin
>> field on user accounts.
>>
>> I can create a user sending in this xml:
>>
>>  <?xml version="1.0" encoding="UTF-8"?>
>> <atom:entry 
>> xmlns:atom="http://www.w3.org/**2005/Atom<http://www.w3.org/2005/Atom>
>> "
>>   
>> xmlns:apps="http://schemas.**google.com/apps/2006<http://schemas.google.com/apps/2006>
>> ">
>>     <atom:category 
>> scheme="http://schemas.google.**com/g/2005#kind<http://schemas.google.com/g/2005#kind>
>> "
>>         
>> term="http://schemas.google.**com/apps/2006#user<http://schemas.google.com/apps/2006#user>
>> "/>
>>     <apps:login userName="amclean"
>>         password="test1234" suspended="false"/>
>>     <apps:name familyName="McLean" givenName="Alex"/>
>>     <apps:property name="userEmail" value="[email protected]"/>
>>    * <apps:property name="changePasswordAtNextLogin" value="true"/>*
>> </atom:entry>
>>
>> which returns:
>>
>> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='
>> http://www.w3.org/2005/**Atom <http://www.w3.org/2005/Atom>' xmlns:apps='
>> http://schemas.**google.com/apps/2006<http://schemas.google.com/apps/2006>'
>> xmlns:gd='http://schemas.**google.com/g/2005<http://schemas.google.com/g/2005>
>> '><id>https:/**/apps-apis.google.com/a/feeds/**gbp.com/user/2.0/amclean<https://apps-apis.google.com/a/feeds/gbp.com/user/2.0/amclean>
>> </id><**updated>1970-01-01T00:00:00.**000Z</updated><category scheme='
>> http://schemas.google.**com/g/2005#kind<http://schemas.google.com/g/2005#kind>'
>> term='http://schemas.google.**com/apps/2006#user'/<http://schemas.google.com/apps/2006#user'/>><title
>> type='text'>amclean</title><**link rel='self' type='application/atom+xml'
>> href='https://apps-apis.**google.com/a/feeds/gbp.com/**user/2.0/amclean'/<https://apps-apis.google.com/a/feeds/gbp.com/user/2.0/amclean'/>><link
>> rel='edit' type='application/atom+xml' href='https://apps-apis.**
>> google.com/a/feeds/gbp.com/**user/2.0/amclean'/<https://apps-apis.google.com/a/feeds/gbp.com/user/2.0/amclean'/>><apps:login
>> userName='amclean' suspended='false' ipWhitelisted='false' admin='false'
>> *changePasswordAtNextLogin='false' *agreedToTerms='false'/><apps:**quota
>> limit='25600'/><apps:name familyName='McLean' givenName='Alex'/><gd:feedLink
>> rel='http://schemas.google.**com/apps/2006#user.nicknames<http://schemas.google.com/apps/2006#user.nicknames>'
>> href='https://apps-apis.**google.com/a/feeds/gbp.com/**
>> nickname/2.0?username=amclean'**/<https://apps-apis.google.com/a/feeds/gbp.com/nickname/2.0?username=amclean'/>><gd:feedLink
>> rel='http://schemas.google.**com/apps/2006#user.emailLists<http://schemas.google.com/apps/2006#user.emailLists>'
>> href='https://apps-apis.**google.com/a/feeds/gbp.com/**
>> emailList/2.0?recipient=**amclean%40gbp.com'/<https://apps-apis.google.com/a/feeds/gbp.com/emailList/2.0?recipient=amclean%40gbp.com'/>
>> ></entry>
>>
>> and sure enough, a password change is not required at login.
>>
>> Then I can try to update the field sending in this xml:
>>
>> <atom:entry 
>> xmlns:atom="http://www.w3.org/**2005/Atom<http://www.w3.org/2005/Atom>
>> "
>>   
>> xmlns:apps="http://schemas.**google.com/apps/2006<http://schemas.google.com/apps/2006>
>> ">
>>    <apps:property name="**changePasswordAtNextLogin" value="true"/>
>> </atom:entry>
>>
>> which returns:
>>
>> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='
>> http://www.w3.org/2005/**Atom <http://www.w3.org/2005/Atom>' xmlns:apps='
>> http://schemas.**google.com/apps/2006<http://schemas.google.com/apps/2006>
>> '><id>http**s://apps-apis.google.com/a/**feeds/user/2.0/gbp.com/**
>> amclean%40gbp.com<https://apps-apis.google.com/a/feeds/user/2.0/gbp.com/amclean%40gbp.com>
>> </id><**updated>2011-06-23T11:52:50.**502Z</updated><link rel='self'
>> type='application/atom+xml' href='https://apps-apis.**
>> google.com/a/feeds/user/2.0/**gbp.com/amclean%40gbp.com'/<https://apps-apis.google.com/a/feeds/user/2.0/gbp.com/amclean%40gbp.com'/>
>> ><**link rel='edit' type='application/atom+xml' href='https://apps-apis.*
>> *google.com/a/feeds/user/2.0/**gbp.com/amclean%40gbp.com'/<https://apps-apis.google.com/a/feeds/user/2.0/gbp.com/amclean%40gbp.com'/>
>> ><**apps:property *name='changePasswordAtNextLogin' value='true'*
>> /></entry>
>>
>> But the user still does not need to enter a new password on login.
>> Thank you for any assistance you can provide.
>>
>> --
>> 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/-/2obH-UfTtJ8J.
>> 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.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Apps Domain Information and Management 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-mgmt-apis?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Apps Domain Information and Management 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-mgmt-apis?hl=en.

Reply via email to