ModifyUserPropertyByAccountName not updating for any user but me

Jun 30, 2014 at 8:04 PM
I can update all user properties for all users via the GUI but when executing the code below inside of a custom ASPX page within SharePoint Online, it will only update my account.

here is the code:
``` function updateUserProfile(userId, propertyName, propertyValue) {

var propertyData = "<PropertyData>" +
"<IsPrivacyChanged>false</IsPrivacyChanged>" +
"<IsValueChanged>true</IsValueChanged>" +
"<Name>" + propertyName + "</Name>" +
"<Privacy>NotSet</Privacy>" +
"<Values><ValueData><Value xsi:type=\"xsd:string\">" + propertyValue + "</Value></ValueData></Values>" +
"</PropertyData>";

$().SPServices({
operation: "ModifyUserPropertyByAccountName",
async: false,
webURL: "/",
accountName: userId,
newData: propertyData,
completefunc: function (xData, Status) {
  var result = $(xData.responseXML);
}
});

}

Any ideas what I am missing?
Thanks,
Gary
Jul 2, 2014 at 6:48 PM
Just wondering if anyone else has seen this issue?
Thanks,
Gary
Coordinator
Jul 3, 2014 at 12:30 PM
My guess is that it's a permissions issue.

M.
Jul 3, 2014 at 1:39 PM
Marc,
My thoughts as well, just not sure how to address the issue since I do have full permissions to update via the GUI. Is it possible that the web service call made by SPService is not authenticating me as needed?
Thanks,
Gary
Coordinator
Jul 3, 2014 at 1:41 PM
Calls via the Web Services use the identity - and thus the permissions - of the current user.

M.