---
sourceDocument: Yokohama Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/application-development

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Authenticate using basic authentication

# Authenticate to a ServiceNow instance using basic authentication with the ServiceNow SDK {#ariaid-title1}

* Release version: Yokohama
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Use basic authentication to connect to a ServiceNow instance with the ServiceNow SDK.

## Before you begin

Role required: admin

## About this task

This procedure uses the ServiceNow SDK command-line interface (CLI). From a command-line tool, enter `now-sdk --help` to get information about the available commands and global options. To get additional information about a
command and its parameters, enter the command and `--help` or `-h`. For example, `now-sdk auth --help`. For more information about the CLI, see [ServiceNow SDK CLI](https://servicenow-prod.fluidtopics.net/hPmXl7RwP9KU_tvIvID1rg#servicenow-sdk-cli-commands "Use the ServiceNow SDK command-line interface (CLI) to manage changes between a local application and the application on an instance.").  
Note:  
To use non-interactive authentication in CI/CD pipelines, see the [install](https://servicenow-prod.fluidtopics.net/hPmXl7RwP9KU_tvIvID1rg#now-sdk-deploy-command "Package the build artifacts and install or update an application on an instance. Before using the install command, you must use the build command to generate an installable package.") command.

## Procedure

1. Create a local directory for your application.
2. In Visual Studio Code, open the directory.
3. From the application directory, open an integrated Terminal window.
4. Specify the instance to authenticate to with the `auth` command.  

       npx @servicenow/sdk auth --add <instance>

   For example:

       npx @servicenow/sdk auth --add https://myinstance.service-now.com

   Note:  
   Using the `npx` command installs the ServiceNow SDK in your application directory instead of globally.
5. Respond to the following series of prompts.  
   {#authenticate-instance-basic-auth__table_ivh_lzn_pdc__entry__2}

   | Prompt | Response |
   |-|-|
   | Type of authentication to use | Select basic. |
   | Alias for these credentials | Enter an alias for your credentials and the instance. The alias can be used for authentication with the `init`, `transform`, `dependencies`, and `install` commands. |
   | The username to authenticate with the instance | Enter your username for the instance. You must be assigned the admin role. |
   | The password to authenticate with the instance | Enter your password. |
   [ ]

   {#authenticate-instance-basic-auth__table_ivh_lzn_pdc}

## Result

The alias and credentials are stored in the device keychain or credential manager on your system and are set as the default credentials.

## What to do next

Add an application to your local system with the ServiceNow SDK. For more information, see [Adding applications with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/fgX_LkzJKQI3LJvXCY~msg "Add applications to your local system to get started with development in source code with the ServiceNow SDK.").

