Is It Possible to Update a User's Custom Fields Via the API?

Hi All,

I'm trying to automate some user updates via that Solar Winds Service Desk (formerly SAManage) API. We're have a custom field for every user called "empid" - a unique ID per user that's separate from the one the Service Desk generates. Some users are lacking this value and we want to backfill them, so I'm writing code that hits a separate DB, gets their empid, and then updates their Service Desk profile. The problem is, I cannot manage to get the value to show up for users with no existing empid OR change for users with an existing empid that's incorrect. I can change anything else in the user object, but have not been able to get custom fields to change.

I did some research and it appears there's still work being done on the custom fields API but I can't quite tell if that's just for creating NEW custom fields (which we're not trying to do) or for updating them on users, tickets, etc.

I've tried every format I could think of to update the user's custom field, to no avail. Some examples:

updatedUser.custom_fields_values = [
  {
    name: 'Empid',
    value: 12345,
  },
];
and
updatedUser.custom_fields_values = {
  custom_fields_value: [
    {
      name: 'Empid',
      value: 12345,
    },
  ],
};

and
updatedUser.custom_fields_values = {
  custom_fields_value: [
    {
      attachment: null,
      custom_field_id: 4257891,
      entity: null,
      id: 230146872,
      name: 'Empid',
      options: '',
      type: 1,
      type_name: 'Text',
      user: null,
      value: 12345,
    },
  ],
};
With no luck. I'm unsure if it's a formatting issue or if the API's just not set up to do this yet. Any info would be appreciated.
Thanks!
-Chris

Parents
  • We used to be able to update the custom fields via API. For some reason, it stopped working between July 21st-July 27th

    I have an open ticket with Samanage since July 27th. The only update I have is "Our Product Team is looking into this, but we cannot provide an ETA yet. Please let me know if you have questions or clarifications."

    We have been using this API call to help us manage user lifecycle functions for the last year

Reply
  • We used to be able to update the custom fields via API. For some reason, it stopped working between July 21st-July 27th

    I have an open ticket with Samanage since July 27th. The only update I have is "Our Product Team is looking into this, but we cannot provide an ETA yet. Please let me know if you have questions or clarifications."

    We have been using this API call to help us manage user lifecycle functions for the last year

Children