Skip to main content

updateUser

Requires permission users:user:update.

Updates a user. A user in another organization is refused unless you hold the cross-organization user update permission. Needs users:user:update.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation UpdateUser($id: String!, $input: UpdateUserInput!) {
updateUser(id: $id, input: $input) {
id
postalCode
name
firstName
lastName
status
directPermissions {
id
name
createdAt
action
description
direct
}
}
}

Variables:

{
"id": "string",
"input": {}
}

Response:

{
"data": {
"updateUser": {
"id": "id",
"postalCode": "string",
"name": "string",
"firstName": "string",
"lastName": "string",
"status": "ACTIVE",
"directPermissions": [
{
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"action": "string",
"description": "string",
"direct": true
}
]
}
}
}
updateUser(
id: String!
input: UpdateUserInput!
): User!

Arguments​

updateUser.id ● String! non-null scalar​

The ID of the user.

updateUser.input ● UpdateUserInput! non-null input​

The fields to change.

Type​

User object​

A user of the organization.