---
title: "Update a user."
method: PUT
path: "/v1/users/{id}"
tags: ["userManagement"]
---

# Update a user.

`PUT /v1/users/{id}`

Update an existing user in the organization.

## Path parameters

- `id` string, required

## Request body

- UpdateUserDefinition
  - `firstName` string, required — First name of the user. If the caller has `manageUsersAndRoles` capability, this field can be updated for any user. If the caller does NOT have `manageUsersAndRoles` capability, then only the calling user's firstName can be updated.
  - `lastName` string, required — Last name of the user. If the caller has `manageUsersAndRoles` capability, this field can be updated for any user. If the caller does NOT have `manageUsersAndRoles` capability, then only the calling user's lastName can be updated.
  - `isActive` boolean — This has the value `true` if the user is active and `false` if they have been deactivated. To modify this field you must have the `manageUserAndRoles` capability.
  - `roleIds` string[] — List of role identifiers associated with the user. To modify this field you must have the `manageUserAndRoles` capability.

## Response `200`

The user was successfully modified.

- UserModel
  - `firstName` string, required — First name of the user.
  - `lastName` string, required — Last name of the user.
  - `email` string, email, required — Email address of the user.
  - `roleIds` string[], required — List of roleIds associated with the user.
  - `createdAt` string, date-time, required — Creation timestamp in UTC in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
  - `createdBy` string, required — Identifier of the user who created the resource.
  - `modifiedAt` string, date-time, required — Last modification timestamp in UTC.
  - `modifiedBy` string, required — Identifier of the user who last modified the resource.
  - `id` string, required — Unique identifier for the user.
  - `isActive` boolean — True if the user is active.
  - `isLocked` boolean — This has the value `true` if the user's account has been locked. If a user tries to log into their account several times and fails, his or her account will be locked for security reasons.
  - `isMfaEnabled` boolean — True if multi factor authentication is enabled for the user.
  - `lastLoginTimestamp` string, date-time — Timestamp of the last login for the user in UTC. Will be null if the user has never logged in.

## Other responses

- `default` — Operation failed with an error.

---

[API](https://skmtc.net/sumologic/apis/sumo-logic-api.md) · [All operations](https://skmtc.net/sumologic/apis/sumo-logic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sumologic/sumo-logic-api/revisions/18a824df1e78/schema)
