auth.changePassword(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Changes the current user’s NetSuite password.

See Creating a Strong Password for information about valid passwords.

Returns

void

Supported Script Types

Server scripts

For additional information, see SuiteScript 2.x Script Types.

Governance

10 units

Module

N/auth Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.currentPassword

string

required

The logged in user’s current NetSuite password.

options.newPassword

string

required

The logged in user’s new NetSuite password.

See Creating a Strong Password for information about valid passwords.

Errors

Error Code

Thrown If

INVALID_PSWD

The options.password does not conform to the password rules.

See Creating a Strong Password for information about valid passwords.

INVALID_EMAIL

The options.newEmail is invalid.

SSS_MISSING_REQD_ARGUMENT

The options.currentPassword or options.newPassword is not specified.

Syntax
Important:

The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see N/auth Module Script Sample.

          //Add additional code 
...
auth.changePassword({
    currentPassword: 'mycurrentPWD',
    newPassword: 'mynewPWD_2*'
});
...
//Add additional code 

        

Related Topics

N/auth Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices