account:setup:ci
Sets up an account to use with SuiteCloud SDK and configures the default auth ID for the SuiteCloud project. This command doesn't 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 (also called authentication ID or auth ID in the docs). |
--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. Only specify this if you want to use a custom NetSuite domain. |
--privatekeypath |
Required |
References the local path to the private key file that matches the certificate in NetSuite. For example: |
-h or --help |
Optional |
Displays the help for this command. |
To get 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 in the OAuth 2.0 Client Credentials Setup by choosing SuiteCloud Development Integration in the Application field and selecting the entity and role to map. This will generate a new row with 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
Here's a command that sets 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 you run the command, it produces an 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.