set or update changePasswordAtNextLogin

40 views
Skip to first unread message

Greg McLean

unread,
Jun 24, 2011, 4:01:40 PM6/24/11
to google-app...@googlegroups.com
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"
    <atom:category scheme="http://schemas.google.com/g/2005#kind"
    <apps:login userName="amclean"
        password="test1234" suspended="false"/>
    <apps:name familyName="McLean" givenName="Alex"/>
    <apps:property name="userEmail" value="amc...@gbp.com"/>
    <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' xmlns:apps='http://schemas.google.com/apps/2006' xmlns:gd='http://schemas.google.com/g/2005'><id>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' term='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'/><link rel='edit' type='application/atom+xml' href='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' href='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' href='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"
   <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' xmlns:apps='http://schemas.google.com/apps/2006'><id>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'/><link rel='edit' type='application/atom+xml' href='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.

Jorge Luis Mendez

unread,
Jun 24, 2011, 4:24:47 PM6/24/11
to google-app...@googlegroups.com
Hi Greg,

Interesting.  Are you using one of the API libraries or implementing your own? Which language?


--
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 google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Claudio Cherubino

unread,
Jun 27, 2011, 4:32:12 AM6/27/11
to google-app...@googlegroups.com
Hi Greg,

Assuming you are in a single-domain environment, the xml to create an user should look like:

<?xml version="1.0" encoding="UTF-8"?>
    <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"?>
 <apps:login changePasswordAtNextLogin="true"/>
</atom:entry>

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

Claudio

Greg McLean

unread,
Jun 27, 2011, 9:55:47 AM6/27/11
to Google Apps Domain Information and Management APIs
THANK YOU!!!!!
That fixes me right up.
If you are ever in Green Bay, look me up. I owe you some free beer!

On Jun 27, 3:32 am, Claudio Cherubino <ccherub...@google.com> wrote:
> 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_...)
> with those for a multi-domain environment (http://code.google.com/googleapps/domain/gdata_provisioning_api_v2.0_...
> ).
> 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 <jo...@jorgemendez.me>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 <greg.l.mcl...@gmail.com>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="amc...@gbp.com"/>
> >>    * <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=am...>><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=...>
> >> ></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.c...>
> >> ><**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.c...>
> >> ><**apps:property *name='changePasswordAtNextLogin' value='true'*
Reply all
Reply to author
Forward
0 new messages