authenticateci

Grants authorization for SuiteCloud SDK to access NetSuite with an account-role combination. It doesn't require browser-based login to NetSuite. This command is helpful for automated environments such as CI.

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

Syntax

          authenticateci [-account AccountId]  
    [-authid AuthId]
    [-certificateid CertificateId]
    [-privatekeypath PrivateKeyPath]
    [-url NetSuiteDomainURL] 

        

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 documentation).

-certificateid

Required

References the certificate ID you get from NetSuite after uploading the public key file.

-url

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 that matches the certificate in NetSuite. For example: d:/path/private-key.pem.

-h or -help

Optional

Prints 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 your current SuiteCloud project:

$ sdfcli authenticateci -authid AuthId -certificateid CertificateId -privatekeypath d:/path/private-key.pem -account AccountId

Output example

When you run the command, it produces an output that is similar to the following example:

The authentication was successful with the following account and role: Account ID [Role]. This project will use the authentication ID "AuthId" as default.

Related Topics

General Notices