Configuring and managing your ServiceNow CLI connection profiles
-
- UpdatedAug 1, 2024
- 2 minutes to read
- Xanadu
- Building applications
Create a connection profile to connect with your instance, view connection profiles, refresh your connection and available commands, or delete profiles you no longer need.
The ServiceNow CLI stores profile information in a config.json file which, by default, is stored in your home directory at the following path:
- Linux and Mac: ~/.snc/config.json
- Windows: %USERPROFILE%\.snc\config.json
The CLI uses this file to determine what information to use to connect to an instance, and what settings to use to generate output. By default, the ServiceNow CLI uses the settings found in the default profile to connect to an instance. To use alternate settings, you can create and reference additional named profiles. For more information, see Configuring and managing your ServiceNow CLI connection profiles.
The following example shows a configuration file with a default profile and a named profile. Each profile can use different credentials and specify different hosts and output formats.