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. 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. |
-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 matching the certificate in NetSuite. For example: |
-h or -help |
Optional |
Prints 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 in the Application field and selecting the entity and role to be mapped. This 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 command sets up the account to use with 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
- SuiteCloud CLI for Java Commands
- adddependencies
- authenticate
- createfile
- createproject
- deploy
- importbundle
- importconfiguration
- importfiles
- importobjects
- listbundles
- listconfiguration
- listfiles
- listmissingdependencies
- listobjects
- manageauth
- package
- preview
- project
- update
- updatecustomrecordwithinstances
- uploadfiles
- uploadfolders
- validate