account:setup:ci
Sets up an account to use with SuiteCloud SDK and configures the default auth ID for the SuiteCloud project. This command does not require browser-based login to NetSuite and is helpful for automated environments such as CI.
To change the default auth ID for the project, run: suitecloud account:setup
.
For more information, see OAuth 2.0 Authentication for SuiteCloud SDK.
Syntax
account:setup:ci [--account myAccountId] [--authid myAuthId] [--certificateid myCertificateId] [--domain myNetsuiteDomainURL] [--privatekeypath myPrivateKeyPath]
Options
Option |
Required / Optional |
Description |
--account |
Required |
References the NetSuite account ID. |
--authid |
Required |
References the custom alias you give to a specific account-role combination. Referred to as authentication ID and auth ID in the documentation. |
--certificateid |
Required |
References the certificate ID obtained from NetSuite after uploading the public key file. |
--domain |
Optional |
References the NetSuite domain of the account you want to use. It only needs to be specified if you want to use a customized NetSuite domain. |
--privatekeypath |
Required |
References the local path to the private key file matching the certificate in NetSuite. For example: |
-h or --help |
Optional |
Displays the help for this command. |
To obtain the certificate ID, you need to generate an RSA certificate. The RSA certificate has two parts: the public key and the private key.
Upload the public key into the OAuth 2.0 Client Credentials Setup by specifying SuiteCloud Development Integration Application and select the desired role. That action generates a new row that will provide the certificate ID value.
The private key path value is the location where the private key is saved.
For more information about how to generate the RSA certificate, see Certificate Conditions.
For more information about how to upload the public key, follow the steps in OAuth 2.0 Client Credentials Setup.
Example
The following example uses the command to set up the account for use with your current SuiteCloud project:
suitecloud account:setup:ci --authid myAuthId --certificateid iozrrinfw18oa4quy23gmlzcgkfo25ixx60ha0w6cxf --privatekeypath d:/path/private-key.pem --account 1234567
Output Example
When executed, the command produces output that is similar to the following:
The authentication was successful with the following account and role: My account name [Developer]. This project will use the authentication ID "myAuthId" as default.