问题
I am trying to update user's reach profile attributes with below apps script. It is updating all fields except only addresses. Kindly suggest if I am missing anything. Below is the part of code:
var resource = {
organizations:
[{title: designation,
department: department,
}],
addresses: [
{
locality: "Pune",
streetAddress:"Kothrud",
postalCode:"411038",
primary:true,
region:"Maharashtra",
type: "work",
}
],
phones: [{
type: "work",
value: phone,
},
{
type: "mobile",
value: mobile,
},
{
customType: "Extension",
value: land_line,
},
{
customType:"Middle Name",
value: middle,
}],
}
var result = AdminDirectory.Users.update(resource, email_address)
回答1:
Instead of update you could try result = AdminDirectory.Users.patch(resource, userId);
API link for your reference here.
Hope that helps!
来源:https://stackoverflow.com/questions/29568059/google-admindirectory-api-in-not-updating-addresses