Skip to content

Commit 90bca8a

Browse files
authored
Merge pull request #105255 from aaronpowell/patch-3
Multi-OS example of environment variable setting
2 parents eb74cb9 + 6132dc8 commit 90bca8a

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

articles/key-vault/quick-create-net-v3.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,26 @@ This .NET quickstart relies on environment variables to store credentials that s
149149

150150
Before you build and run your app, use the `setx` command to set the `akvClientId`, `akvClientSecret`, `akvTenantId`, and `akvSubscriptionId` environment variables to the values you noted above.
151151

152+
**Windows**
153+
152154
```console
153-
setx akvClientId <your-clientID>
155+
setx akvClientId "<your-clientID>"
156+
setx akvClientSecret "<your-clientSecret>"
157+
```
158+
159+
**Linux**
154160

155-
setx akvClientSecret <your-clientSecret>
156-
````
161+
```bash
162+
export akvClientId = "<your-clientID>"
163+
export akvClientSecret = "<your-clientSecret>"
164+
```
165+
166+
**MacOS**
157167

158-
Each time you call `setx`, you should get a response of "SUCCESS: Specified value was saved."
168+
```bash
169+
export akvClientId = "<your-clientID>"
170+
export akvClientSecret = "<your-clientSecret>"
171+
```
159172

160173
Assign these environment variables to strings in your code, and then authenticate your application by passing them to the [KeyVaultClient class](/dotnet/api/microsoft.azure.keyvault.keyvaultclient):
161174

0 commit comments

Comments
 (0)