> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a SCIM user

> Fully replaces a SCIM user's attributes. Returns 200 with the updated user. Returns 204 when setting `active` to `false` on a pending invite.

Required scopes: `user_management:read-write`.

<h4 style={{borderBottom:"none"}}>Authorizations</h4>

<ParamField header="Authorization" type="string" required>
  This API uses OAuth 2.0 with the authorization code grant flow.
</ParamField>

<h4 style={{borderBottom:"none"}}>Path</h4>

<ParamField path="user_id" type="string" required>
  The workspace membership ID or workspace invite ID of the user to update.
</ParamField>

<div style={{display:"flex",justifyContent:"space-between",alignItems:"center"}}><h4 style={{borderBottom:"none",margin:"0"}}>Body</h4><span style={{fontSize:"0.75rem",fontWeight:"400",color:"#9ca3af"}}>application/json</span></div>

<ParamField body="schemas" type="string[]" required>
  Must include `"urn:ietf:params:scim:schemas:core:2.0:User"`.
</ParamField>

<ParamField body="userName" type="string" required>
  The user's email address. Must be a valid email.
</ParamField>

<ParamField body="name" type="object">
  <Expandable title="name">
    <ParamField body="givenName" type="string">
      The user's first name.
    </ParamField>

    <ParamField body="familyName" type="string">
      The user's last name.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="active" type="boolean">
  Whether the user should be active. Setting to `false` suspends the member and revokes their active sessions.
</ParamField>

<ParamField body="appRole" type="string">
  The user's role: `"admin"` or `"member"`.
</ParamField>

<h4 style={{borderBottom:"none"}}>Response</h4>

Returns `200` with the updated user. Returns `204 No Content` when setting `active` to `false` on a pending invite; deprovisioning an active member returns `200`.

<ResponseField name="schemas" type="string[]">
  Always `["urn:ietf:params:scim:schemas:core:2.0:User"]`.
</ResponseField>

<ResponseField name="id" type="string">
  The workspace membership ID or workspace invite ID.
</ResponseField>

<ResponseField name="userName" type="string">
  The user's email address.
</ResponseField>

<ResponseField name="name" type="object">
  <Expandable title="name">
    <ResponseField name="givenName" type="string">
      The user's first name.
    </ResponseField>

    <ResponseField name="familyName" type="string">
      The user's last name.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="emails" type="object[]">
  <Expandable title="emails[]">
    <ResponseField name="value" type="string">
      The email address.
    </ResponseField>

    <ResponseField name="primary" type="boolean">
      Whether this is the primary email address.
    </ResponseField>

    <ResponseField name="type" type="string">
      Always `"work"`.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="active" type="boolean">
  Whether the user is active.
</ResponseField>

<ResponseField name="appRole" type="string">
  The user's role: `"admin"` or `"member"`. Not present for suspended users.
</ResponseField>

<ResponseField name="meta" type="object">
  <Expandable title="meta">
    <ResponseField name="resourceType" type="string">
      Always `"User"`.
    </ResponseField>

    <ResponseField name="created" type="string">
      ISO 8601 timestamp of when the user was created.
    </ResponseField>

    <ResponseField name="lastModified" type="string">
      ISO 8601 timestamp of when the user was last modified.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```json theme={"system"}
  {
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
    "userName": "john.doe@example.com",
    "name": {
      "givenName": "John",
      "familyName": "Doe"
    },
    "appRole": "admin",
    "active": true
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"system"}
  {
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
    "id": "3a8f5b2c-9e14-4d7a-b832-1c6f85d90e47",
    "userName": "john.doe@example.com",
    "name": {
      "givenName": "John",
      "familyName": "Doe"
    },
    "emails": [
      {
        "value": "john.doe@example.com",
        "primary": true,
        "type": "work"
      }
    ],
    "appRole": "admin",
    "active": true,
    "meta": {
      "resourceType": "User",
      "created": "2024-01-01T00:00:00.000Z",
      "lastModified": "2024-01-02T00:00:00.000Z"
    }
  }
  ```

  ```json 204 theme={"system"}
  {}
  ```
</ResponseExample>
