> ## Documentation Index
> Fetch the complete documentation index at: https://lightdash-mintlify-9d6f9427.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Replace user

> Update a user by ID (SCIM PUT)



## OpenAPI

````yaml https://raw.githubusercontent.com/lightdash/lightdash/refs/heads/main/packages/backend/src/generated/swagger.json put /api/v1/scim/v2/Users/{userUuid}
openapi: 3.0.0
info:
  title: Lightdash API
  version: 0.3249.0
  description: >
    Open API documentation for all public Lightdash API endpoints. #
    Authentication Before you get started, you might need to create a Personal
    Access Token to authenticate via the API. You can create a token by
    following this guide: https://docs.lightdash.com/references/personal_tokens
  license:
    name: MIT
  contact:
    name: Lightdash Support
    email: support@lightdash.com
    url: https://docs.lightdash.com/help-and-contact/contact/contact_info/
servers:
  - url: /
security: []
tags:
  - name: My Account
    description: These routes allow users to manage their own user account.
  - name: Organizations
    description: >-
      Each user is a member of a single organization. These routes allow users
      to manage their organization. Most actions are only available to admin
      users.
  - name: Projects
    description: >-
      Projects belong to a single organization. These routes allow users to
      manage their projects, browse content, and execute queries. Users inside
      an organization might have access to a project from an organization-level
      role or they might be granted access to a project directly.
  - name: Spaces
    description: >-
      Spaces allow you to organize charts and dashboards within a project. They
      also allow granular access to content by allowing you to create private
      spaces, which are only accessible to the creator and admins.
  - name: Roles & Permissions
    description: >-
      These routes allow users to manage roles and permissions for their
      organization.
    externalDocs:
      url: https://docs.lightdash.com/references/roles
  - name: Query
    description: >-
      These routes allow users to execute and manage queries against their data
      warehouse. This includes metric queries, SQL queries, and retrieving query
      results.
paths:
  /api/v1/scim/v2/Users/{userUuid}:
    put:
      tags:
        - SCIM
      summary: Replace user
      description: Update a user by ID (SCIM PUT)
      operationId: UpdateScimUser
      parameters:
        - description: UUID of the user to update
          in: path
          name: userUuid
          required: true
          schema:
            type: string
      requestBody:
        description: Updated user data
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScimUpsertUser'
              description: Updated user data
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScimUser'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScimErrorPayload'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScimErrorPayload'
      security: []
components:
  schemas:
    ScimUpsertUser:
      allOf:
        - $ref: '#/components/schemas/Omit_ScimUser.id_'
        - properties:
            title:
              type: string
            password:
              type: string
          type: object
    ScimUser:
      properties:
        schemas:
          items:
            type: string
          type: array
        id:
          type: string
        meta:
          properties:
            version:
              type: string
            location:
              type: string
            lastModified:
              type: string
              format: date-time
            created:
              type: string
              format: date-time
            resourceType:
              type: string
          type: object
        userName:
          type: string
        name:
          properties:
            familyName:
              type: string
            givenName:
              type: string
          type: object
        active:
          type: boolean
        emails:
          items:
            properties:
              primary:
                type: boolean
              value:
                type: string
            required:
              - value
            type: object
          type: array
        roles:
          items:
            $ref: '#/components/schemas/ScimUserRole'
          type: array
        urn:lightdash:params:scim:schemas:extension:2.0:User:
          $ref: '#/components/schemas/LightdashScimExtension'
      required:
        - schemas
        - id
        - userName
      type: object
      additionalProperties: true
    ScimErrorPayload:
      properties:
        status:
          type: string
          description: >-
            HTTP status code as a string, indicating the status of the response.

            For example: "400" for bad requests, "404" for not found, "500" for
            server errors.
        detail:
          type: string
          description: >-
            Human-readable description of the error, providing details about why
            the error occurred.
        schemas:
          items:
            $ref: '#/components/schemas/ScimSchemaType.ERROR'
          type: array
          description: >-
            Array of schema URIs that describe the structure of the SCIM error
            response.

            Typically includes "urn:ietf:params:scim:api:messages:2.0:Error".
        scimType:
          type: string
          enum:
            - invalidFilter
            - tooMany
            - uniqueness
            - mutability
            - invalidSyntax
            - invalidPath
            - noTarget
            - invalidValue
            - invalidVers
            - sensitive
          description: >-
            NOTE: this is taken from the SCIM spec here:
            https://datatracker.ietf.org/doc/html/rfc7644#section-3.7.3

            A SCIM-specific error type that provides additional context for the
            error.

            - 'invalidFilter': The specified filter syntax was invalid or the
            attribute and comparison combination is not supported.
              Applicable for GET (Section 3.4.2), POST (Search - Section 3.4.3), PATCH (Path Filter - Section 3.5.2).
            - 'tooMany': The filter yields too many results for the server to
            process.
              Applicable for GET (Section 3.4.2), POST (Search - Section 3.4.3).
            - 'uniqueness': One or more attribute values are already in use or
            reserved.
              Applicable for POST (Create - Section 3.3), PUT (Section 3.5.1), PATCH (Section 3.5.2).
            - 'mutability': The modification is incompatible with the target
            attribute's mutability.
              Applicable for PUT (Section 3.5.1), PATCH (Section 3.5.2).
            - 'invalidSyntax': The request body structure was invalid or did not
            conform to the schema.
              Applicable for POST (Search - Section 3.4.3, Create - Section 3.3, Bulk - Section 3.7), PUT (Section 3.5.1).
            - 'invalidPath': The "path" attribute was invalid or malformed.
              Applicable for PATCH (Section 3.5.2).
            - 'noTarget': The specified "path" did not yield an attribute that
            could be operated on.
              Applicable for PATCH (Section 3.5.2).
            - 'invalidValue': A required value was missing, or the value
            specified was not compatible with the operation.
              Applicable for GET (Section 3.4.2), POST (Create - Section 3.3, Query - Section 3.4.3), PUT (Section 3.5.1), PATCH (Section 3.5.2).
            - 'invalidVers': The specified SCIM protocol version is not
            supported.
              Applicable for GET (Section 3.4.2), POST (ALL), PUT (Section 3.5.1), PATCH (Section 3.5.2), DELETE (Section 3.6).
            - 'sensitive': The request cannot be completed due to sensitive
            information passed in the URI.
              Applicable for GET (Section 3.4.2).
      required:
        - status
        - detail
        - schemas
      type: object
    Omit_ScimUser.id_:
      $ref: '#/components/schemas/Pick_ScimUser.Exclude_keyofScimUser.id__'
      description: Construct a type with the properties of T except for those in type K.
    ScimUserRole:
      properties:
        value:
          type: string
        display:
          type: string
        type:
          type: string
        primary:
          type: boolean
      required:
        - value
      type: object
      additionalProperties: true
    LightdashScimExtension:
      properties:
        role:
          type: string
          deprecated: true
      type: object
      additionalProperties: true
    ScimSchemaType.ERROR:
      enum:
        - urn:ietf:params:scim:api:messages:2.0:Error
      type: string
    Pick_ScimUser.Exclude_keyofScimUser.id__:
      properties:
        urn:lightdash:params:scim:schemas:extension:2.0:User:
          $ref: '#/components/schemas/LightdashScimExtension'
        schemas:
          items:
            type: string
          type: array
        userName:
          type: string
        name:
          properties:
            familyName:
              type: string
            givenName:
              type: string
          type: object
        active:
          type: boolean
        emails:
          items:
            properties:
              primary:
                type: boolean
              value:
                type: string
            required:
              - value
            type: object
          type: array
        roles:
          items:
            $ref: '#/components/schemas/ScimUserRole'
          type: array
        meta:
          properties:
            version:
              type: string
            location:
              type: string
            lastModified:
              type: string
              format: date-time
            created:
              type: string
              format: date-time
            resourceType:
              type: string
          type: object
      required:
        - schemas
        - userName
      type: object
      description: From T, pick a set of properties whose keys are in the union K

````