account:setup:ci

Sets up an account to use with SuiteCloud SDK and configures the default auth ID for your SuiteCloud project.

          suitecloud account:setup:ci [--account myAccountId] [--authid myAuthId] [--certificateid myCertificateId] [--domain myNetsuiteDomainURL] [--privatekeypath myPrivateKeyPath] 

        

With this command, you can also select an existing auth ID as the default for your SuiteCloud project.

          suitecloud account:setup:ci [--select myAuthId] 

        

This command doesn't require browser-based login to NetSuite and is helpful for automated environments such as CI.

Note:

To change the default auth ID for the project, run: suitecloud account:setup:ci --select myAuthId.

Syntax

            suitecloud account:setup:ci <--account myAccountId> <--authid myAuthId> <--certificateid myCertificateId> [--domain myNetsuiteDomainURL] <--privatekeypath myPrivateKeyPath> 

          
            suitecloud account:setup:ci [--select myAuthId] 

          

For more information, see OAuth 2.0 Authentication for SuiteCloud SDK.

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: d:/path/private-key.pem.

--select

Optional

Selects an existing auth ID as the default for your SuiteCloud project.

For example, suitecloud account:setup:ci --select myAuthId.

This option is mutually exclusive to all other options. If you select it, all other options become unavailable.

-h or --help

Optional

Displays the help for this command.

Important:

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 

          

Here's a command that selects an existing auth ID as the default for your SuiteCloud project.

            suitecloud account:setup:ci select myAuthId 

          

Output Example

When you run the command to set up an account, 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. 

          

When you run the command to select an existing auth ID, it produces an output that is similar to the following:

            The authentication ID was successfully changed. This project will use the auth ID "myAuthId" as default. 

          

Related Topics

General Notices