Skip to main content

Set a user password

PUT 

/api/web/v1/users/:userid/passwords

Set a user password for the specified user. Caller requires the USERPASSWORDS:EDIT permission.

Request

Path Parameters

    userid stringrequired

    The UUID of the user whose password is to be created or modified.

Body

required

    clearPasswordHistory boolean

    If set to true, this flag indicates existing password history is cleared before the new password is created.

    currentPassword string

    A value for the current password when changing the AD-User password.

    emailPassword boolean

    A flag indicating whether to email a new password to the user. It defaults to true.

    expiryTime date-time

    The date at which the password will expire.

    forceUpdate boolean

    If set to true, this value indicates the user will be forced to change their password upon next password authentication.

    generatePassword boolean

    A flag indicating whether a new random password is generated. It defaults to false.

    password string

    A value for the new password when setting the user password. This value is ignored if generatePassword is set to true.

    passwordFormat string

    Possible values: [CLEARTEXT, BCRYPT]

    Default value: CLEARTEXT

    Define the password format of new password, it's BCRYPT when importing BCrypted password, it defaults to CLEARTEXT if not provided.When passwordFormat is BCRYPT, the following restrictions must be enforced:

    • 1.the user must be an IDaaS local user.
    • 2.currentPassword must be null.
    • 3.generatePassword must be false.
    • 4.emailPassword must be false.
    • 5.returnPassword must be false.

    returnPassword boolean

    A flag indicating if a password generated by IDaaS should be returned to the caller. This flag is ignored if the password is passed from the client. It defaults to false.

Responses

Successful

Schema

    expiryNotificationDate date-time

    The date at which the next password expiry notification will be sent.

    expiryTime date-time

    The date at which the password will expire.

    forceUpdate boolean

    Indicates if the user will be forced to change their password the next time the user authenticates with it.

    lastChangedTime date-time

    The last time the password was changed.

    newPassword string

    The value of the new password generated by IDaaS if requested by the client.

    present boolean

    A flag that indicates if the user has a password.

Loading...