You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Learn how to create, retrieve, and delete certificates from an Azure key vault using the JavaScript client library with either JavaScript or TypeScript
# Quickstart: Azure Key Vault certificate client library for JavaScript
16
16
17
-
Get started with the Azure Key Vault certificate client library for JavaScript. [Azure Key Vault](../general/overview.md) is a cloud service that provides a secure store for certificates. You can securely store keys, passwords, certificates, and other secrets. Azure key vaults may be created and managed through the Azure portal. In this quickstart, you learn how to create, retrieve, and delete certificates from an Azure key vault using the JavaScript client library
17
+
Get started with the Azure Key Vault certificate client library for JavaScript. [Azure Key Vault](../general/overview.md) is a cloud service that provides a secure store for certificates. You can securely store keys, passwords, certificates, and other secrets. Azure key vaults may be created and managed through the Azure portal. In this quickstart, you learn how to create, retrieve, and delete certificates from an Azure key vault using the JavaScript client library.
18
18
19
19
Key Vault client library resources:
20
20
@@ -102,25 +102,25 @@ Create a Node.js application that uses your key vault.
102
102
103
103
## Set environment variables
104
104
105
-
This application is using key vault name as an environment variable called `KEY_VAULT_NAME`.
105
+
This application is using key vault endpoint as an environment variable called `KEY_VAULT_URL`.
106
106
107
107
### [Windows](#tab/windows)
108
108
109
109
```cmd
110
-
set KEY_VAULT_NAME=<your-key-vault-name>
110
+
set KEY_VAULT_URL=<your-key-vault-endpoint>
111
111
````
112
112
113
113
### [PowerShell](#tab/powershell)
114
114
115
115
Windows PowerShell
116
116
```powershell
117
-
$Env:KEY_VAULT_NAME="<your-key-vault-name>"
117
+
$Env:KEY_VAULT_URL="<your-key-vault-endpoint>"
118
118
```
119
119
120
120
### [macOS or Linux](#tab/linux)
121
121
122
122
```cmd
123
-
export KEY_VAULT_NAME=<your-key-vault-name>
123
+
export KEY_VAULT_URL=<your-key-vault-endpoint>
124
124
```
125
125
---
126
126
@@ -130,7 +130,7 @@ Application requests to most Azure services must be authorized. Using the [Defau
130
130
131
131
In this quickstart, `DefaultAzureCredential` authenticates to key vault using the credentials of the local development user logged into the Azure CLI. When the application is deployed to Azure, the same `DefaultAzureCredential` code can automatically discover and use a managed identity that is assigned to an App Service, Virtual Machine, or other services. For more information, see [Managed Identity Overview](/azure/active-directory/managed-identities-azure-resources/overview).
132
132
133
-
In this code, the name of your key vault is used to create the key vault URI, in the format `https://<your-key-vault-name>.vault.azure.net`. For more information about authenticating to key vault, see [Developer's Guide](/azure/key-vault/general/developers-guide#authenticate-to-key-vault-in-code).
133
+
In this code, the endpoint of your key vault is used to create the key vault client. The endpoint format looks like `https://<your-key-vault-name>.vault.azure.net` but may change for sovereign clouds. For more information about authenticating to key vault, see [Developer's Guide](/azure/key-vault/general/developers-guide#authenticate-to-key-vault-in-code).
134
134
135
135
## Code example
136
136
@@ -166,11 +166,10 @@ This code uses the following [Key Vault Certificate classes and methods](/javasc
166
166
// - AZURE_CLIENT_SECRET: The client secret for the registered application
167
167
constcredential=newDefaultAzureCredential();
168
168
169
-
constkeyVaultName=process.env["KEY_VAULT_NAME"];
170
-
if(!keyVaultName) thrownewError("KEY_VAULT_NAME is empty");
# Quickstart: Azure Key Vault key client library for JavaScript
16
16
17
17
18
-
Get started with the Azure Key Vault key client library for JavaScript. [Azure Key Vault](../general/overview.md) is a cloud service that provides a secure store for cryptographic keys. You can securely store keys, passwords, certificates, and other secrets. Azure key vaults may be created and managed through the Azure portal. In this quickstart, you learn how to create, retrieve, and delete keys from an Azure key vault using the JavaScript key client library
18
+
Get started with the Azure Key Vault key client library for JavaScript. [Azure Key Vault](../general/overview.md) is a cloud service that provides a secure store for cryptographic keys. You can securely store keys, passwords, certificates, and other secrets. Azure key vaults may be created and managed through the Azure portal. In this quickstart, you learn how to create, retrieve, and delete keys from an Azure key vault using the JavaScript key client library.
19
19
20
20
Key Vault client library resources:
21
21
@@ -103,25 +103,25 @@ Create a Node.js application that uses your key vault.
103
103
104
104
## Set environment variables
105
105
106
-
This application is using key vault name as an environment variable called `KEY_VAULT_NAME`.
106
+
This application is using key vault endpoint as an environment variable called `KEY_VAULT_URL`.
107
107
108
108
### [Windows](#tab/windows)
109
109
110
110
```cmd
111
-
set KEY_VAULT_NAME=<your-key-vault-name>
111
+
set KEY_VAULT_URL=<your-key-vault-endpoint>
112
112
````
113
113
114
114
### [PowerShell](#tab/powershell)
115
115
116
116
Windows PowerShell
117
117
```powershell
118
-
$Env:KEY_VAULT_NAME="<your-key-vault-name>"
118
+
$Env:KEY_VAULT_URL="<your-key-vault-endpoint>"
119
119
```
120
120
121
121
### [macOS or Linux](#tab/linux)
122
122
123
123
```cmd
124
-
export KEY_VAULT_NAME=<your-key-vault-name>
124
+
export KEY_VAULT_URL=<your-key-vault-endpoint>
125
125
```
126
126
---
127
127
@@ -131,7 +131,7 @@ Application requests to most Azure services must be authorized. Using the [Defau
131
131
132
132
In this quickstart, `DefaultAzureCredential` authenticates to key vault using the credentials of the local development user logged into the Azure CLI. When the application is deployed to Azure, the same `DefaultAzureCredential` code can automatically discover and use a managed identity that is assigned to an App Service, Virtual Machine, or other services. For more information, see [Managed Identity Overview](/azure/active-directory/managed-identities-azure-resources/overview).
133
133
134
-
In this code, the name of your key vault is used to create the key vault URI, in the format `https://<your-key-vault-name>.vault.azure.net`. For more information about authenticating to key vault, see [Developer's Guide](/azure/key-vault/general/developers-guide#authenticate-to-key-vault-in-code).
134
+
In this code, the endpoint of your key vault is used to create the key vault client. The endpoint format looks like `https://<your-key-vault-name>.vault.azure.net` but may change for sovereign clouds. For more information about authenticating to key vault, see [Developer's Guide](/azure/key-vault/general/developers-guide#authenticate-to-key-vault-in-code).
135
135
136
136
## Code example
137
137
@@ -169,11 +169,10 @@ This code uses the following [Key Vault Secret classes and methods](/javascript/
169
169
// - AZURE_CLIENT_SECRET: The client secret for the registered application
170
170
constcredential=newDefaultAzureCredential();
171
171
172
-
constkeyVaultName=process.env["KEY_VAULT_NAME"];
173
-
if(!keyVaultName) thrownewError("KEY_VAULT_NAME is empty");
# Quickstart: Azure Key Vault secret client library for JavaScript
16
16
17
-
Get started with the Azure Key Vault secret client library for JavaScript. [Azure Key Vault](../general/overview.md) is a cloud service that provides a secure store for secrets. You can securely store keys, passwords, certificates, and other secrets. Azure key vaults may be created and managed through the Azure portal. In this quickstart, you learn how to create, retrieve, and delete secrets from an Azure key vault using the JavaScript client library
17
+
Get started with the Azure Key Vault secret client library for JavaScript. [Azure Key Vault](../general/overview.md) is a cloud service that provides a secure store for secrets. You can securely store keys, passwords, certificates, and other secrets. Azure key vaults may be created and managed through the Azure portal. In this quickstart, you learn how to create, retrieve, and delete secrets from an Azure key vault using the JavaScript client library.
18
18
19
19
Key Vault client library resources:
20
20
@@ -105,25 +105,25 @@ Create a Node.js application that uses your key vault.
105
105
106
106
## Set environment variables
107
107
108
-
This application is using key vault name as an environment variable called `KEY_VAULT_NAME`.
108
+
This application is using key vault endpoint as an environment variable called `KEY_VAULT_URL`.
109
109
110
110
### [Windows](#tab/windows)
111
111
112
112
```cmd
113
-
set KEY_VAULT_NAME=<your-key-vault-name>
113
+
set KEY_VAULT_URL=<your-key-vault-endpoint>
114
114
````
115
115
116
116
### [PowerShell](#tab/powershell)
117
117
118
118
Windows PowerShell
119
119
```powershell
120
-
$Env:KEY_VAULT_NAME="<your-key-vault-name>"
120
+
$Env:KEY_VAULT_URL="<your-key-vault-endpoint>"
121
121
```
122
122
123
123
### [macOS or Linux](#tab/linux)
124
124
125
125
```cmd
126
-
export KEY_VAULT_NAME=<your-key-vault-name>
126
+
export KEY_VAULT_URL=<your-key-vault-endpoint>
127
127
```
128
128
---
129
129
@@ -134,7 +134,7 @@ Application requests to most Azure services must be authorized. Using the [Defau
134
134
135
135
In this quickstart, `DefaultAzureCredential` authenticates to key vault using the credentials of the local development user logged into the Azure CLI. When the application is deployed to Azure, the same `DefaultAzureCredential` code can automatically discover and use a managed identity that is assigned to an App Service, Virtual Machine, or other services. For more information, see [Managed Identity Overview](/azure/active-directory/managed-identities-azure-resources/overview).
136
136
137
-
In this code, the name of your key vault is used to create the key vault URI, in the format `https://<your-key-vault-name>.vault.azure.net`. For more information about authenticating to key vault, see [Developer's Guide](/azure/key-vault/general/developers-guide#authenticate-to-key-vault-in-code).
137
+
In this code, the endpoint of your key vault is used to create the key vault client. The endpoint format looks like `https://<your-key-vault-name>.vault.azure.net` but may change for sovereign clouds. For more information about authenticating to key vault, see [Developer's Guide](/azure/key-vault/general/developers-guide#authenticate-to-key-vault-in-code).
138
138
139
139
## Code example
140
140
@@ -167,11 +167,10 @@ This code uses the following [Key Vault Secret classes and methods](/javascript/
167
167
// - AZURE_CLIENT_SECRET: The client secret for the registered application
168
168
constcredential=newDefaultAzureCredential();
169
169
170
-
constkeyVaultName=process.env["KEY_VAULT_NAME"];
171
-
if(!keyVaultName) thrownewError("KEY_VAULT_NAME is empty");
0 commit comments