Skip to content

Commit 6618946

Browse files
authored
Update multiline-secrets.md
The multiline secret is returned as `My\nSecret`, where the `\n` is NOT the newline character, but rather `\` and `n`. This is unexpected, because the documentation says newline, and I as .NET developer where `\n` is commonly used to denote the invisible newline character expected that those are literal newlines.
1 parent dd91d7b commit 6618946

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

articles/key-vault/secrets/multiline-secrets.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ You can then view the stored secret using the Azure CLI [az keyvault secret show
3939
az keyvault secret show --name "MultilineSecret" --vault-name "<your-unique-keyvault-name>" --query "value"
4040
```
4141

42-
The secret will be returned with newlines embedded:
42+
The secret will be returned with `\n` in place of newline:
4343

4444
```bash
4545
"This is\nmy multi-line\nsecret"
4646
```
4747

48+
The `\n` above is a `\` and `n` character, not the newline character.
49+
4850
## Set the secret using Azure Powershell
4951

5052
With Azure PowerShell, you must first read in the file using the [Get-Content](/powershell/module/microsoft.powershell.management/get-content) cmdlet, then convert it to a secure string using [ConvertTo-SecureString](/powershell/module/microsoft.powershell.security/convertto-securestring).
@@ -66,12 +68,14 @@ You can then view the stored secret using the Azure CLI [az keyvault secret show
6668
az keyvault secret show --name "MultilineSecret" --vault-name "<your-unique-keyvault-name>" --query "value"
6769
```
6870

69-
The secret will be returned with newlines embedded:
71+
The secret will be returned with `\n` in place of newline:
7072

7173
```bash
7274
"This is\nmy multi-line\nsecret"
7375
```
7476

77+
The `\n` above is a `\` and `n` character, not the newline character.
78+
7579
## Next steps
7680

7781
- Read an [Overview of Azure Key Vault](../general/overview.md)

0 commit comments

Comments
 (0)