Google AdminDirectory api in not updating addresses

放肆的年华 提交于 2020-02-07 05:29:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!