# Replace user's auth based on configured company auth type

Replace the user's authentication values from scratch. The
authentication type is derived from the company config.

Endpoint: PUT /users/{userId}/auth
Version: 2025-03-26
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

  - `userId` (string, required)
    Unique user identifier.

## Request fields (application/json):

  - `email` (string, required)
    The email address to use for the new auth.

  - `password` (string)
    The new password to use. Only applicable for `basic` auth.

  - `phone` (string, required)
    The phone number to use for the new auth.

  - `samlSubjectNameId` (string, required)
    The SAML subject name ID to use for the new auth.

## Response 200 fields (application/json):

  - `message` (string)
    Description of the server action or error.

  - `status` (integer)
    HTTP status code.

  - `data` (object)

  - `data.authType` (string)
    Enum: "basic", "google", "oneTimeCodeEmail", "oneTimeCodeText", "SAML"

  - `data.authValueType` (string)
    Enum: "email", "username", "phone", "samlSubjectNameId"

  - `data.value` (string)

