---
title: Update User
slug: kron-pam-api-collection-340/update-user
docTags: 
createdAt: 2024-07-12T13:38:00.272Z
---

{
  "id": "sXBlVIRtVv1DnmC16xQBJ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/user/updateUser",
    "name": "",
    "description": "<h3>Overview</h3>\n<p>This method updates a user's information in KRON PAM.</p>\n<h3>Usage</h3>\n<p>To update a user's information:</p>\n<ol>\n<li>Use the <a href=\"https://grey-trinity-199170.postman.co/workspace/My-Workspace~c1372f8e-9fd4-40a5-8ceb-35b3caeef048/documentation/29406512-8d1ecbb2-3dd8-453c-97e4-3fd6673e2880?entity=request-ff2d1554-04ee-4525-99aa-6759f3377167\" target=\"_blank\">Get User Details By Id</a> request to retrieve the user's current details.</li>\n<li>Copy the response of the <a href=\"https://grey-trinity-199170.postman.co/workspace/My-Workspace~c1372f8e-9fd4-40a5-8ceb-35b3caeef048/documentation/29406512-8d1ecbb2-3dd8-453c-97e4-3fd6673e2880?entity=request-ff2d1554-04ee-4525-99aa-6759f3377167\">Get User Details By Id</a> request to the \"Body\" field of the <code>saveUser</code> request.</li>\n<li>Edit the necessary fields in the \"Body\" field.</li>\n<li>Send the request to apply the changes.</li>\n</ol>\n<h3>Notes</h3>\n<ul>\n<li><strong>Password Update</strong>:\n<ul>\n<li>If you intend to change the password, only modify the password field. There's no need to change other fields.</li>\n<li>The <code>passwordDirty</code> parameter must be set to \"true\" when a password change is required.</li>\n</ul>\n</li>\n<li><strong>User Info Updates</strong>:\n<ul>\n<li>The <code>passwordDirty</code> parameter must be set to \"false\" when updating user information, excluding the password.</li>\n</ul>\n</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Content-Type",
          "description": "",
          "default": "application/json",
          "value": "application/json",
          "type": "string"
        },
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\n    \"id\": \"d4251ded-cf05-47af-b245-4637ae3debdd\",\n    \"eid\": \"barisCic\",\n    \"personelId\": null,\n    \"name\": \"Bariscic\",\n    \"passwordAlgorithm\": null,\n    \"password\": null,\n    \"secondPassword\": null,\n    \"email\": null,\n    \"surname\": \"10297 :)\",\n    \"internal\": false,\n    \"creationTime\": 1703068414993,\n    \"groups\": [\n        \"DEFAULT_GROUP_SYSYEM_USERS\",\n        \"cf7013df-9b88-4ea8-a07f-b65960788d14\"\n    ],\n    \"managerGroups\": [],\n    \"lastLogin\": null,\n    \"tempUserStartTime\": null,\n    \"tempUserEndTime\": null,\n    \"lastLoginIp\": null,\n    \"ubaThreshold\": \"50\",\n    \"properties\": {\n        \"ubaThreshold\": \"50\",\n        \"objectGUID\": \"c16e2cd1-f35c-41ef-b4e0-f54b55db2f08\",\n        \"externalDirectorySource\": \"ldap\",\n        \"hey\":\"heyt\"\n    }\n}\n",
          "value": "{\n    \"id\": \"d4251ded-cf05-47af-b245-4637ae3debdd\",\n    \"eid\": \"barisCic\",\n    \"personelId\": null,\n    \"name\": \"Bariscic\",\n    \"passwordAlgorithm\": null,\n    \"password\": null,\n    \"secondPassword\": null,\n    \"email\": null,\n    \"surname\": \"10297 :)\",\n    \"internal\": false,\n    \"creationTime\": 1703068414993,\n    \"groups\": [\n        \"DEFAULT_GROUP_SYSYEM_USERS\",\n        \"cf7013df-9b88-4ea8-a07f-b65960788d14\"\n    ],\n    \"managerGroups\": [],\n    \"lastLogin\": null,\n    \"tempUserStartTime\": null,\n    \"tempUserEndTime\": null,\n    \"lastLoginIp\": null,\n    \"ubaThreshold\": \"50\",\n    \"properties\": {\n        \"ubaThreshold\": \"50\",\n        \"objectGUID\": \"c16e2cd1-f35c-41ef-b4e0-f54b55db2f08\",\n        \"externalDirectorySource\": \"ldap\",\n        \"hey\":\"heyt\"\n    }\n}\n",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Update User",
        "jsonExample": "{\n    \"id\": \"e5bd67aa-a99e-4c72-b55f-28cd3c54fb0b\",\n    \"eid\": \"barisCic\",\n    \"personelId\": null,\n    \"name\": \"Bariscic\",\n    \"passwordAlgorithm\": null,\n    \"password\": null,\n    \"secondPassword\": null,\n    \"email\": null,\n    \"phoneNumber\": null,\n    \"surname\": \"10297 :)\",\n    \"fullname\": null,\n    \"location\": null,\n    \"internal\": false,\n    \"locked\": false,\n    \"forcePassword\": false,\n    \"lockReason\": null,\n    \"creationTime\": 1705400708026,\n    \"groups\": null,\n    \"groupNames\": null,\n    \"userGroupModels\": null,\n    \"managerGroups\": null,\n    \"managerGroupModels\": null,\n    \"lastLogin\": null,\n    \"tempUserStartTime\": null,\n    \"tempUserEndTime\": null,\n    \"lastLoginIp\": null,\n    \"ubaThreshold\": null,\n    \"properties\": {\n        \"ubaThreshold\": \"51\",\n        \"objectGUID\": \"c16e2cd1-f35c-41ef-b4e0-f54b55db2f08\",\n        \"externalDirectorySource\": \"ldap\",\n        \"added-property-test\": \"test-vaule\"\n    },\n    \"firstResult\": 0,\n    \"maxResult\": 50,\n    \"tempUser\": false\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "8nypQdPK0Pn93vv-na8Gs",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/user/updateUser \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n    \\\"id\\\": \\\"d4251ded-cf05-47af-b245-4637ae3debdd\\\",\\n    \\\"eid\\\": \\\"barisCic\\\",\\n    \\\"personelId\\\": null,\\n    \\\"name\\\": \\\"Bariscic\\\",\\n    \\\"passwordAlgorithm\\\": null,\\n    \\\"password\\\": null,\\n    \\\"secondPassword\\\": null,\\n    \\\"email\\\": null,\\n    \\\"surname\\\": \\\"10297 :)\\\",\\n    \\\"internal\\\": false,\\n    \\\"creationTime\\\": 1703068414993,\\n    \\\"groups\\\": [\\n        \\\"DEFAULT_GROUP_SYSYEM_USERS\\\",\\n        \\\"cf7013df-9b88-4ea8-a07f-b65960788d14\\\"\\n    ],\\n    \\\"managerGroups\\\": [],\\n    \\\"lastLogin\\\": null,\\n    \\\"tempUserStartTime\\\": null,\\n    \\\"tempUserEndTime\\\": null,\\n    \\\"lastLoginIp\\\": null,\\n    \\\"ubaThreshold\\\": \\\"50\\\",\\n    \\\"properties\\\": {\\n        \\\"ubaThreshold\\\": \\\"50\\\",\\n        \\\"objectGUID\\\": \\\"c16e2cd1-f35c-41ef-b4e0-f54b55db2f08\\\",\\n        \\\"externalDirectorySource\\\": \\\"ldap\\\",\\n        \\\"hey\\\":\\\"heyt\\\"\\n    }\\n}\\n\"'"
        },
        {
          "id": "mhPU2zlzfFZIJrWBqQjQ-",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar raw = JSON.stringify(\"{\\n    \\\"id\\\": \\\"d4251ded-cf05-47af-b245-4637ae3debdd\\\",\\n    \\\"eid\\\": \\\"barisCic\\\",\\n    \\\"personelId\\\": null,\\n    \\\"name\\\": \\\"Bariscic\\\",\\n    \\\"passwordAlgorithm\\\": null,\\n    \\\"password\\\": null,\\n    \\\"secondPassword\\\": null,\\n    \\\"email\\\": null,\\n    \\\"surname\\\": \\\"10297 :)\\\",\\n    \\\"internal\\\": false,\\n    \\\"creationTime\\\": 1703068414993,\\n    \\\"groups\\\": [\\n        \\\"DEFAULT_GROUP_SYSYEM_USERS\\\",\\n        \\\"cf7013df-9b88-4ea8-a07f-b65960788d14\\\"\\n    ],\\n    \\\"managerGroups\\\": [],\\n    \\\"lastLogin\\\": null,\\n    \\\"tempUserStartTime\\\": null,\\n    \\\"tempUserEndTime\\\": null,\\n    \\\"lastLoginIp\\\": null,\\n    \\\"ubaThreshold\\\": \\\"50\\\",\\n    \\\"properties\\\": {\\n        \\\"ubaThreshold\\\": \\\"50\\\",\\n        \\\"objectGUID\\\": \\\"c16e2cd1-f35c-41ef-b4e0-f54b55db2f08\\\",\\n        \\\"externalDirectorySource\\\": \\\"ldap\\\",\\n        \\\"hey\\\":\\\"heyt\\\"\\n    }\\n}\\n\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/user/updateUser\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "C2lh6O_pk4859rbV4r0CY",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/user/updateUser\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"{\\n    \\\"id\\\": \\\"d4251ded-cf05-47af-b245-4637ae3debdd\\\",\\n    \\\"eid\\\": \\\"barisCic\\\",\\n    \\\"personelId\\\": null,\\n    \\\"name\\\": \\\"Bariscic\\\",\\n    \\\"passwordAlgorithm\\\": null,\\n    \\\"password\\\": null,\\n    \\\"secondPassword\\\": null,\\n    \\\"email\\\": null,\\n    \\\"surname\\\": \\\"10297 :)\\\",\\n    \\\"internal\\\": false,\\n    \\\"creationTime\\\": 1703068414993,\\n    \\\"groups\\\": [\\n        \\\"DEFAULT_GROUP_SYSYEM_USERS\\\",\\n        \\\"cf7013df-9b88-4ea8-a07f-b65960788d14\\\"\\n    ],\\n    \\\"managerGroups\\\": [],\\n    \\\"lastLogin\\\": null,\\n    \\\"tempUserStartTime\\\": null,\\n    \\\"tempUserEndTime\\\": null,\\n    \\\"lastLoginIp\\\": null,\\n    \\\"ubaThreshold\\\": \\\"50\\\",\\n    \\\"properties\\\": {\\n        \\\"ubaThreshold\\\": \\\"50\\\",\\n        \\\"objectGUID\\\": \\\"c16e2cd1-f35c-41ef-b4e0-f54b55db2f08\\\",\\n        \\\"externalDirectorySource\\\": \\\"ldap\\\",\\n        \\\"hey\\\":\\\"heyt\\\"\\n    }\\n}\\n\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "0uZESTFu8T_CM_6Ex9wOH",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/user/updateUser\"\n\npayload = json.dumps(\"{\\n    \\\"id\\\": \\\"d4251ded-cf05-47af-b245-4637ae3debdd\\\",\\n    \\\"eid\\\": \\\"barisCic\\\",\\n    \\\"personelId\\\": null,\\n    \\\"name\\\": \\\"Bariscic\\\",\\n    \\\"passwordAlgorithm\\\": null,\\n    \\\"password\\\": null,\\n    \\\"secondPassword\\\": null,\\n    \\\"email\\\": null,\\n    \\\"surname\\\": \\\"10297 :)\\\",\\n    \\\"internal\\\": false,\\n    \\\"creationTime\\\": 1703068414993,\\n    \\\"groups\\\": [\\n        \\\"DEFAULT_GROUP_SYSYEM_USERS\\\",\\n        \\\"cf7013df-9b88-4ea8-a07f-b65960788d14\\\"\\n    ],\\n    \\\"managerGroups\\\": [],\\n    \\\"lastLogin\\\": null,\\n    \\\"tempUserStartTime\\\": null,\\n    \\\"tempUserEndTime\\\": null,\\n    \\\"lastLoginIp\\\": null,\\n    \\\"ubaThreshold\\\": \\\"50\\\",\\n    \\\"properties\\\": {\\n        \\\"ubaThreshold\\\": \\\"50\\\",\\n        \\\"objectGUID\\\": \\\"c16e2cd1-f35c-41ef-b4e0-f54b55db2f08\\\",\\n        \\\"externalDirectorySource\\\": \\\"ldap\\\",\\n        \\\"hey\\\":\\\"heyt\\\"\\n    }\\n}\\n\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "8nypQdPK0Pn93vv-na8Gs"
    },
    "results": {
      "languages": [
        {
          "id": "QwMcFhIBnE_f6CDF8zMmI",
          "language": "200",
          "code": "{\n    \"id\": \"e5bd67aa-a99e-4c72-b55f-28cd3c54fb0b\",\n    \"eid\": \"barisCic\",\n    \"personelId\": null,\n    \"name\": \"Bariscic\",\n    \"passwordAlgorithm\": null,\n    \"password\": null,\n    \"secondPassword\": null,\n    \"email\": null,\n    \"phoneNumber\": null,\n    \"surname\": \"10297 :)\",\n    \"fullname\": null,\n    \"location\": null,\n    \"internal\": false,\n    \"locked\": false,\n    \"forcePassword\": false,\n    \"lockReason\": null,\n    \"creationTime\": 1705400708026,\n    \"groups\": null,\n    \"groupNames\": null,\n    \"userGroupModels\": null,\n    \"managerGroups\": null,\n    \"managerGroupModels\": null,\n    \"lastLogin\": null,\n    \"tempUserStartTime\": null,\n    \"tempUserEndTime\": null,\n    \"lastLoginIp\": null,\n    \"ubaThreshold\": null,\n    \"properties\": {\n        \"ubaThreshold\": \"51\",\n        \"objectGUID\": \"c16e2cd1-f35c-41ef-b4e0-f54b55db2f08\",\n        \"externalDirectorySource\": \"ldap\",\n        \"added-property-test\": \"test-vaule\"\n    },\n    \"firstResult\": 0,\n    \"maxResult\": 50,\n    \"tempUser\": false\n}"
        }
      ],
      "selectedLanguageId": "QwMcFhIBnE_f6CDF8zMmI"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}