Google AdminDirectory API不更新地址 [英] Google AdminDirectory api in not updating addresses

查看:118
本文介绍了Google AdminDirectory API不更新地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用下面的应用程序脚本更新用户的覆盖面个人资料属性。它正在更新除地址以外的所有字段。请建议我是否缺少任何东西。以下是代码的一部分:

  var resource = {
organizations:
[{title:designation ,
department:department,
}],
地址:[
{
locality:Pune,
streetAddress:Kothrud,
postalCode:411038,
primary:true,
region:Maharashtra,
type:work,
}
],
手机:[{
type:work,
value:phone,
},
{
类型:mobile,
值:手机,
},
{
customType:Extension,
value:land_line,
},
{
customType:中Name,
value:middle,
}],
}

var result = AdminDirectory.Users.update(resource,email_address)


解决方案

不用更新,您可以尝试 result = AdminDirectory.Users 。拍ch(resource,userId);



供您参考的API链接 here

希望有帮助!


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)

解决方案

Instead of update you could try result = AdminDirectory.Users.patch(resource, userId);

API link for your reference here.

Hope that helps!

这篇关于Google AdminDirectory API不更新地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆