**Source URL:** https://limited.veevavault.dev/medical/vault-toolbox/vs-code-extension/guides/managing-environments

# Managing Environments

Vault Toolbox connects to Vault through saved environments. Environments are named connections to a Vault DNS, each with its own authentication method. You can save multiple environments and connect to more than one at a time, with one marked as active at any moment.

This guide explains how to add, connect to, and manage environments.

## Authentication Methods

When you add an environment, you can select from one of the following authentication methods:

*   **Basic (User Name/Password)**: Prompts for your username and password.
*   **Session ID**: Prompts for an active Vault session ID.
*   **API Access Token**: Prompts for a Vault [API access token](/medical/vault-api/explanation/api-access-tokens/).

## Adding an Environment

To add an environment:

<Steps>
1.  Select the **Vault Toolbox** icon in the lefthand panel.
2.  Select the **Environments** (<Icon name="ph:users-three" />) tab.
3.  Click **Add Environment**.
4.  Enter a **Vault DNS**, for example `myvault.veevavault.com`.
5.  Optional: Enter a **Label** to distinguish this environment. If left blank, Vault Toolbox adopts the connected Vault's own name on first connect.
6.  Select an **Authentication Method** (**Basic**, **Session ID**, or **API Access Token**) and provide the corresponding credentials.
    
    <ThemeImage srcLight="/images/toolbox/vscode-extension/environment_light.png" srcDark="/images/toolbox/vscode-extension/environment_dark.png" alt="Vault Toolbox Visual Studio Code Extension Add Environment" />
    
7.  Click **Add**.
</Steps>

Once successfully added, a card for the new environment appears under the list of *All Environments.*

## Connecting to an Environment

In the **Environments** tab, click <Icon name="ph:plug" /> on an environment's card to connect to it, or <Icon name="ph:plugs-connected" /> to disconnect. You can connect to more than one environment at a time, although only one can be active at any moment.

<ThemeImage srcLight="/images/toolbox/vscode-extension/active_environment_light.png" srcDark="/images/toolbox/vscode-extension/active_environment_dark.png" alt="Vault Toolbox Visual Studio Code Extension Active Environment" />

The environment you're actively working with is marked *ACTIVE*. The active, connected environment is pinned in a *Current Environment* section at the top of the list. Every other environment, connected or not, appears under *All Environments*. Click <Icon name="ph:power" /> on a connected environment to make it active.

<Aside>
A status bar entry always shows the active environment's label, with a *PROD* suffix when it's connected to a production Vault. Click it to reveal the *Environments* tab.
</Aside>

Expand **Vault Info** on a connected environment's card to view the details of that Vault, including a link that opens the Vault DNS in your browser.

## Editing or Removing an Environment

Click <Icon name="ph:pencil-simple" /> on an environment's card to change its Vault DNS, label, authentication method, or credentials. Leave the credential field blank to keep the existing one.

Click <Icon name="ph:trash" /> to remove an environment. This also removes its saved credentials.

## Working with Production Vaults

Vault Toolbox labels a connected environment with *PROD* when it detects a production Vault. Actions that write to Vault, such as [deploying or dropping MDL](/medical/vault-toolbox/vs-code-extension/guides/mdl), [deploying or deleting Vault Java SDK code](/medical/vault-toolbox/vs-code-extension/guides/vault-java-sdk-code), and [applying changes from comparing environments](/medical/vault-toolbox/vs-code-extension/guides/comparing-environments), are blocked on a production Vault.

---

**Previous:** [Guides](/medical/vault-toolbox/vs-code-extension/guides)  
**Next:** [Using the VQL Editor](/medical/vault-toolbox/vs-code-extension/guides/vql-editor)