Skip to content

Commit 09959fd

Browse files
committed
Updates
1 parent 42b7625 commit 09959fd

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

aspnetcore/blazor/security/blazor-web-app-with-entra.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ Execute the following command in a command shell from the server project's direc
124124
dotnet user-secrets set "AzureAd:ClientSecret" "{SECRET}"
125125
```
126126

127-
If using Visual Studio, you can confirm the secret is set by right-clicking the server project in **Solution Explorer** and selecting **Manage User Secrets**.
127+
If using Visual Studio, you can confirm that the secret is set by right-clicking the server project in **Solution Explorer** and selecting **Manage User Secrets**.
128128

129129
### Azure Key Vault
130130

131-
[Azure Key Vault](https://azure.microsoft.com/products/key-vault/) provides a safe approach for providing the app's client secret to the app when hosting in [Microsoft Azure](https://azure.microsoft.com/).
131+
[Azure Key Vault](https://azure.microsoft.com/products/key-vault/) provides a safe approach for providing the app's client secret to the app.
132132

133133
To create a key vault and set a client secret, see [About Azure Key Vault secrets (Azure documentation)](/azure/key-vault/secrets/about-secrets), which cross-links resources to get started with Azure Key Vault. To implement the code in this section, record the key vault URI and the secret name from Azure when you create the key vault and secret. When you set the access policy for the secret in the **Access policies** panel:
134134

@@ -137,7 +137,7 @@ To create a key vault and set a client secret, see [About Azure Key Vault secret
137137

138138
The following `GetKeyVaultSecret` method retrieves a secret from a key vault. Add this method to the server project. Adjust the namespace (`BlazorSample.Helpers`) to match your project namespace scheme. If you aren't using Visual Studio, you can use the [Secret Manager tool](#secret-manager-tool) locally to store the secret and use the approach in this section in staging/production when the app is deployed.
139139

140-
`Helpers/AzureHelper`:
140+
`Helpers/AzureHelper.cs`:
141141

142142
```csharp
143143
using Azure;
@@ -191,16 +191,18 @@ if (!context.HostingEnvironment.IsDevelopment())
191191
}
192192
```
193193

194-
In the `AzureAd` section of `appsettings.json`, add the following configuration keys and values:
195-
196-
* The `{VAULT URI}` placeholder is the key vault URI. Include the trailing slash on the URI.
197-
* The `{SECRET NAME}` placeholder is the secret name.
194+
In the `AzureAd` section of `appsettings.json`, add the following `VaultUri` and `SecretName` configuration keys and values:
198195

199196
```json
200197
"VaultUri": "{VAULT URI}",
201198
"SecretName": "{SECRET NAME}"
202199
```
203200

201+
In the preceding example:
202+
203+
* The `{VAULT URI}` placeholder is the key vault URI. Include the trailing slash on the URI.
204+
* The `{SECRET NAME}` placeholder is the secret name.
205+
204206
Example:
205207

206208
```json

0 commit comments

Comments
 (0)