0

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 Answers1

0

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

API link for your reference here.

Hope that helps!

KRR
  • 4,647
  • 2
  • 14
  • 14