【发布时间】:2014-12-02 17:46:30
【问题描述】:
我为 Office 365 创建了一个共享点托管应用程序,我想更新用户配置文件属性。我使用了这段代码:
var clientContext = new SP.ClientContext.get_current();
var peopleManager = new SP.UserProfiles.PeopleManager(clientContext);
peopleManager.setSingleValueProfileProperty(targetUser, "Activite", $("#txt_Activite").val());
context.executeQueryAsync(function () {
//editeProfil();
window.parent.location = hostweburl + "/Pages/MONPROFIL.aspx?&UserTarget=" + targetUser;
}, onFail);
function onFail(data, args)
{
console.log(args.get_message());
}
当我想编辑我的个人资料属性时没问题,但是对于其他用户个人资料我有这个错误:
Access denied
我使用的是管理员帐户。
【问题讨论】:
标签: jquery sharepoint office365