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
Copy file name to clipboardExpand all lines: articles/service-connector/tutorial-connect-web-app-app-configuration.md
+33-16Lines changed: 33 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,11 @@ Start by creating your Azure resources.
69
69
70
70
**location*→ A location near you, for example `eastus`. Use `az account list-locations --output table` to list locations.
71
71
**resource-group*→ You will use this resource group to organize all the Azure resources needed to complete this tutorial. (for example, `service-connector-tutorial-rg`)
72
-
**name*→ The app service name is used as both the name of the resource in Azure and to form the fully qualified domain name foryour appin the form of the server endpoint `https://<app-service-name>.azurewebsites.com`. This name must be **unique across all Azure** and the only allowed characters are `A`-`Z`, `0`-`9`, and `-`. For example, use `webapp-appconfig-smi-\<unique-id>` where `\<unique-id>` is any three characters.
| Location | Choose a location near you. Use `az account list-locations --output table` to list locations. |*eastus*|
75
+
| Resource group name | You will use this resource group to organize all the Azure resources needed to complete this tutorial. |*service-connector-tutorial-rg*|
76
+
| App service name | The app service name is used as the name of the resource in Azure and to form the fully qualified domain name foryour app,in the form of the server endpoint `https://<app-service-name>.azurewebsites.com`. This name must be unique across all Azure and the only allowed characters are `A`-`Z`, `0`-`9`, and `-`. |*webapp-appconfig-smi*|
73
77
74
78
### [UMI](#tab/umi)
75
79
@@ -90,7 +94,11 @@ Start by creating your Azure resources.
90
94
91
95
**location*→ A location near you, for example `eastus`. Use `az account list-locations --output table` to list locations.
92
96
**resource-group*→ You will use this resource group to organize all the Azure resources needed to complete this tutorial. (for example, `service-connector-tutorial-rg`)
93
-
**name*→ The app service name is used as both the name of the resource in Azure and to form the fully qualified domain name foryour appin the form of the server endpoint `https://<app-service-name>.azurewebsites.com`. This name must be **unique across all Azure** and the only allowed characters are `A`-`Z`, `0`-`9`, and `-`. For example, use `webapp-appconfig-umi-\<unique-id>` where `\<unique-id>` is any three characters.
| Location | Choose a location near you. Use `az account list-locations --output table` to list locations. |*eastus*|
100
+
| Resource group name | You will use this resource group to organize all the Azure resources needed to complete this tutorial. |*service-connector-tutorial-rg*|
101
+
| App service name | The app service name is used as the name of the resource in Azure and to form the fully qualified domain name foryour app,in the form of the server endpoint `https://<app-service-name>.azurewebsites.com`. This name must be unique across all Azure and the only allowed characters are `A`-`Z`, `0`-`9`, and `-`. |*webapp-appconfig-umi*|
94
102
95
103
Create a user-assigned managed idendity. Save the output into a temporary notepad.
96
104
```azurecli
@@ -116,7 +124,11 @@ Start by creating your Azure resources.
116
124
117
125
**location*→ A location near you, for example `eastus`. Use `az account list-locations --output table` to list locations.
118
126
**resource-group*→ You will use this resource group to organize all the Azure resources needed to complete this tutorial. (for example, `service-connector-tutorial-rg`)
119
-
**name*→ The app service name is used as both the name of the resource in Azure and to form the fully qualified domain name foryour appin the form of the server endpoint `https://<app-service-name>.azurewebsites.com`. This name must be **unique across all Azure** and the only allowed characters are `A`-`Z`, `0`-`9`, and `-`. For example, use `webapp-appconfig-sp-\<unique-id>` where `\<unique-id>` is any three characters.
| Location | Choose a location near you. Use `az account list-locations --output table` to list locations. |*eastus*|
130
+
| Resource group name | You will use this resource group to organize all the Azure resources needed to complete this tutorial. |*service-connector-tutorial-rg*|
131
+
| App service name | The app service name is used as the name of the resource in Azure and to form the fully qualified domain name foryour app,in the form of the server endpoint `https://<app-service-name>.azurewebsites.com`. This name must be unique across all Azure and the only allowed characters are `A`-`Z`, `0`-`9`, and `-`. |*webapp-appconfig-sp*|
120
132
121
133
Create a service pricipal, make sure replace the `yourSubscriptionID` with your actual subscription ID. Save the output into a temporary notepad.
122
134
@@ -143,7 +155,11 @@ Start by creating your Azure resources.
143
155
144
156
**location*→ A location near you, for example `eastus`. Use `az account list-locations --output table` to list locations.
145
157
**resource-group*→ You will use this resource group to organize all the Azure resources needed to complete this tutorial. (for example, `service-connector-tutorial-rg`)
146
-
**name*→ The app service name is used as both the name of the resource in Azure and to form the fully qualified domain name foryour appin the form of the server endpoint `https://<app-service-name>.azurewebsites.com`. This name must be **unique across all Azure** and the only allowed characters are `A`-`Z`, `0`-`9`, and `-`. For example, use `webapp-appconfig-cs-\<unique-id>` where `\<unique-id>` is any three characters.
| Location | Choose a location near you. Use `az account list-locations --output table` to list locations. |*eastus*|
161
+
| Resource group name | You will use this resource group to organize all the Azure resources needed to complete this tutorial. |*service-connector-tutorial-rg*|
162
+
| App service name | The app service name is used as the name of the resource in Azure and to form the fully qualified domain name foryour app,in the form of the server endpoint `https://<app-service-name>.azurewebsites.com`. This name must be unique across all Azure and the only allowed characters are `A`-`Z`, `0`-`9`, and `-`. |*webapp-appconfig-cs*|
147
163
148
164
---
149
165
@@ -161,8 +177,8 @@ Start by creating your Azure resources.
161
177
162
178
Import the test configuration file to Azure App Configuration using a system-assigned managed identity.
163
179
164
-
1. Cd into the folder `serviceconnector-webapp-appconfig-dotnet\system-managed-identity\Microsoft.Azure.ServiceConnector.Sample`
165
-
1. Import the [./sampleconfigs.json](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/system-managed-identity/Microsoft.Azure.ServiceConnector.Sample/sampleconfigs.json) test configuration file into the App Configuration store. If you're using Cloud Shell, upload [sampleconfigs.json](../cloud-shell/persisting-shell-storage.md) before running the command.
180
+
1. Cd into the folder `serviceconnector-webapp-appconfig-dotnet\system-managed-identity\ServiceConnectorSample`
181
+
1. Import the [./sampleconfigs.json](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/system-managed-identity/ServiceConnectorSample/sampleconfigs.json) test configuration file into the App Configuration store. If you're using Cloud Shell, upload [sampleconfigs.json](../cloud-shell/persisting-shell-storage.md) before running the command.
@@ -172,8 +188,8 @@ Start by creating your Azure resources.
172
188
173
189
Import the test configuration file to Azure App Configuration using a user-assigned managed identity.
174
190
175
-
1. Cd into the folder `serviceconnector-webapp-appconfig-dotnet\user-assigned-managed-identity\Microsoft.Azure.ServiceConnector.Sample`
176
-
1. Import the [./sampleconfigs.json](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/user-assigned-managed-identity/Microsoft.Azure.ServiceConnector.Sample/sampleconfigs.json) test configuration file into the App Configuration store. If you're using Cloud Shell, upload [sampleconfigs.json](../cloud-shell/persisting-shell-storage.md) before running the command.
191
+
1. Cd into the folder `serviceconnector-webapp-appconfig-dotnet\user-assigned-managed-identity\ServiceConnectorSample`
192
+
1. Import the [./sampleconfigs.json](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/user-assigned-managed-identity/ServiceConnectorSample/sampleconfigs.json) test configuration file into the App Configuration store. If you're using Cloud Shell, upload [sampleconfigs.json](../cloud-shell/persisting-shell-storage.md) before running the command.
@@ -183,8 +199,8 @@ Start by creating your Azure resources.
183
199
184
200
Import the test configuration file to Azure App Configuration using service principal.
185
201
186
-
1. Cd into the folder `serviceconnector-webapp-appconfig-dotnet\service-principal\Microsoft.Azure.ServiceConnector.Sample`
187
-
1. Import the [./sampleconfigs.json](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/service-principal/Microsoft.Azure.ServiceConnector.Sample/sampleconfigs.json) test configuration file into the App Configuration store. If you're using Cloud Shell, upload [sampleconfigs.json](../cloud-shell/persisting-shell-storage.md) before running the command.
202
+
1. Cd into the folder `serviceconnector-webapp-appconfig-dotnet\service-principal\ServiceConnectorSample`
203
+
1. Import the [./sampleconfigs.json](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/service-principal/ServiceConnectorSample/sampleconfigs.json) test configuration file into the App Configuration store. If you're using Cloud Shell, upload [sampleconfigs.json](../cloud-shell/persisting-shell-storage.md) before running the command.
@@ -194,8 +210,8 @@ Start by creating your Azure resources.
194
210
195
211
Import the test configuration file to Azure App Configuration using a connection string.
196
212
197
-
1. Cd into the folder `serviceconnector-webapp-appconfig-dotnet\connection-string\Microsoft.Azure.ServiceConnector.Sample`
198
-
1. Import the [./sampleconfigs.json](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/connection-string/Microsoft.Azure.ServiceConnector.Sample/sampleconfigs.json) test configuration file into the App Configuration store. If you're using Cloud Shell, upload [sampleconfigs.json](../cloud-shell/persisting-shell-storage.md) before running the command.
213
+
1. Cd into the folder `serviceconnector-webapp-appconfig-dotnet\connection-string\ServiceConnectorSample`
214
+
1. Import the [./sampleconfigs.json](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/connection-string/ServiceConnectorSample/sampleconfigs.json) test configuration file into the App Configuration store. If you're using Cloud Shell, upload [sampleconfigs.json](../cloud-shell/persisting-shell-storage.md) before running the command.
@@ -266,22 +282,23 @@ Find below what Service Connector manages behind the scenes for each authenticat
266
282
267
283
Service Connector manages the connection configuration for you:
268
284
269
-
- Set up the web app's `AZURE_APPCONFIGURATION_ENDPOINT` to let the application access it and get the App Configuration endpoint. Access [sample code](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/system-managed-identity/Microsoft.Azure.ServiceConnector.Sample/Program.cs#L37).
270
-
- Activate the web app's system-assigned managed authentication and grant App Configuration a Data Reader role to let the application authenticate to the App Configuration using DefaultAzureCredential from Azure.Identity. Access [sample code](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/system-managed-identity/Microsoft.Azure.ServiceConnector.Sample/Program.cs#L43).
285
+
- Set up the web app's `AZURE_APPCONFIGURATION_ENDPOINT` to let the application access it and get the App Configuration endpoint. Access [sample code](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/system-managed-identity/ServiceConnectorSample/Program.cs#L10).
286
+
- Activate the web app's system-assigned managed authentication and grant App Configuration a Data Reader role to let the application authenticate to the App Configuration using DefaultAzureCredential from Azure.Identity. Access [sample code](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/system-managed-identity/ServiceConnectorSample/Program.cs#L13).
271
287
272
288
### [UMI](#tab/umi)
273
289
274
290
Service Connector manages the connection configuration for you:
275
291
276
-
- Set up the web app's `AZURE_APPCONFIGURATION_ENDPOINT` to let the application access it and get the App Configuration endpoint. Access [sample code](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/user-assigned-managed-identity/Microsoft.Azure.ServiceConnector.Sample/Program.cs#L37).
292
+
- Setup the web app's `AZURE_APPCONFIGURATION_ENDPOINT`, `AZURE_APPCONFIGURATION_CLIENTID`
293
+
to let the application access it and get app configuration endpoint in [code](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/user-assigned-managed-identity/ServiceConnectorSample/Program.cs#L10-L12);
277
294
- Activate the web app's user-assigned managed authentication and grant App Configuration a Data Reader role to let the application authenticate to the App Configuration using DefaultAzureCredential from Azure.Identity. Access [sample code](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/user-assigned-managed-identity/ServiceConnectorSample/Program.cs#L16).
278
295
279
296
### [Service principal](#tab/serviceprincipal)
280
297
281
298
Service Connector manages the connection configuration for you:
282
299
283
300
- Set up the web app's `AZURE_APPCONFIGURATION_ENDPOINT` to let the application access it and get the App Configuration endpoint. Access [sample code](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/service-principal/ServiceConnectorSample/Program.cs#L10).
284
-
- Activate the web app's system-assigned managed authentication and grant App Configuration a Data Reader role to let the application authenticate to the App Configuration using DefaultAzureCredential from Azure.Identity. Access [sample code](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/service-principal/Microsoft.Azure.ServiceConnector.Sample/Program.cs#L43).
301
+
- save service principal credential to WebApp AppSettings `AZURE_APPCONFIGURATION_CLIENTID`. `AZURE_APPCONFIGURATION_TENANTID`, `AZURE_APPCONFIGURATION_CLIENTSECRET`and grant App Configuration Data Reader role to the service principal, so the application could be authenticated to the App Configuration in [code](https://github.com/Azure-Samples/serviceconnector-webapp-appconfig-dotnet/blob/main/service-principal/ServiceConnectorSample/Program.cs#L11-L18), by using `ClientSecretCredential` from [Azure.Identity](https://azuresdkdocs.blob.core.windows.net/$web/dotnet/Azure.Identity/1.0.0/api/index.html).
0 commit comments