PATCH
/
v1
/
users
/
{user}
{
  "name": "<string>",
  "state": "STATE_UNSPECIFIED",
  "email": "<string>",
  "title": "<string>",
  "userType": "USER_TYPE_UNSPECIFIED",
  "mfaEnabled": true,
  "mfaSecret": "<string>",
  "recoveryCodes": [
    "<string>"
  ],
  "phone": "<string>",
  "profile": {
    "lastLoginTime": "2023-11-07T05:31:56Z",
    "lastChangePasswordTime": "2023-11-07T05:31:56Z",
    "source": "<string>"
  },
  "groups": [
    "<string>"
  ]
}

Path Parameters

user
string
required

The user id.

Query Parameters

updateMask
string<field-mask>

The list of fields to update.

otpCode
string

The otp_code is used to verify the user's identity by MFA.

regenerateTempMfaSecret
boolean

The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user. This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response.

regenerateRecoveryCodes
boolean

The regenerate_recovery_codes flag means to regenerate recovery codes for user.

allowMissing
boolean

If set to true, and the user is not found, a new user will be created. In this situation, update_mask is ignored.

Body

application/json
state
enum<string>
Available options:
STATE_UNSPECIFIED,
ACTIVE,
DELETED
email
string
title
string
userType
enum<string>
Available options:
USER_TYPE_UNSPECIFIED,
USER,
SYSTEM_BOT,
SERVICE_ACCOUNT
password
string
serviceKey
string
mfaEnabled
boolean

The mfa_enabled flag means if the user has enabled MFA.

mfaSecret
string

The mfa_secret is the temporary secret using in two phase verification.

recoveryCodes
string[]

The recovery_codes is the temporary recovery codes using in two phase verification.

phone
string

Should be a valid E.164 compliant phone number. Could be empty.

profile
object

Response

OK

name
string

The name of the user. Format: users/{user}. {user} is a system-generated unique ID.

state
enum<string>
Available options:
STATE_UNSPECIFIED,
ACTIVE,
DELETED
email
string
title
string
userType
enum<string>
Available options:
USER_TYPE_UNSPECIFIED,
USER,
SYSTEM_BOT,
SERVICE_ACCOUNT
mfaEnabled
boolean

The mfa_enabled flag means if the user has enabled MFA.

mfaSecret
string

The mfa_secret is the temporary secret using in two phase verification.

recoveryCodes
string[]

The recovery_codes is the temporary recovery codes using in two phase verification.

phone
string

Should be a valid E.164 compliant phone number. Could be empty.

profile
object
groups
string[]

The groups for the user. Format: groups/{email}