Re: Error to make a Request to update password in UAA

Filip Hanik

If your `access_token` value is

1. a client_credentials grant - the `oldPassword` field is not evaluated
and can be omitted
2. it's a user token, with the scope of `uaa.admin` and the admin is trying
to change password for another user - the `oldPassword` field is not
evaluated and can be omitted

We will update the documentation to reflect these two use cases.

On Wed, Oct 28, 2015 at 9:43 AM, Juan Antonio BreƱa Moral <
bren(a)> wrote:


Using UAA API, it is possible to create users without password. Later if
you need to update the password what is the right request to make the
process? Current documentation is not very clear:

The document has al ink for a section to udpate password but it was

Using the documentation, the request throws an Error:

uaa_options = {
"password": "abc123456",
"oldPassword": "oldpassword"

return CloudFoundryUsersUAA.updatePassword(token_type, access_token,
uaa_guid, uaa_options);

UsersUAA.prototype.updatePassword = function (token_type, access_token,
uaa_guid, uaa_options) {
"use strict";

var url = this.UAA_API_URL + "/Users/" + uaa_guid + "/password";
var options = {
method: 'PUT',
url: url,
headers: {
Accept: 'application/json',
Authorization: token_type + ' ' + access_token
json: uaa_options

return this.REST.request(options, "200", false);


Error: the string "<html><head><title>Apache Tomcat/7.0.55 - Error
color:#525D76;font-size:22px;} H2
te;background-color:#525D76;font-size:16px;} H3
erif;color:white;background-color:#525D76;font-size:14px;} BODY
oma,Arial,sans-serif;color:black;background-color:white;} B
Arial,sans-serif;color:white;background-color:#525D76;} P
ial,sans-serif;background:white;color:black;font-size:12px;}A {color :
name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Stat
us 400 - </h1><HR size=\"1\" noshade=\"noshade\"><p><b>type</b> Status
<p><b>message</b> <u></u></p><p><b>description</b> <u>The request sent by
the c
lient was syntactically incorrect.</u></p><HR size=\"1\"
Apache Tomcat/7.0.55</h3></body></html>" was thrown, throw an Error :)
Note: it is possible to create an user in UAA with a password in the first
operation, but the documenation is not clear in this point.

var uaa_options = {
"password": "123456",

Usage with CF CLI: cf login -a -u userXXX -p
123456 --skip-ssl-validation

Any help to update passwords?

Juan Antonio

Join to automatically receive all group messages.