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
# Tutorial: Deploy an ASP.NET app to Azure with Azure SQL Database
@@ -260,7 +262,7 @@ Run a few commands to make updates to your local database.
260
262
261
263
1. Type `Ctrl+F5` to run the app. Test the edit, details, and create links.
262
264
263
-
If the application loads without errors, then Code First Migrations has succeeded. However, your page still looks the same because your application logic is not using this new property yet.
265
+
If the application loads without errors, then Code First Migrations has succeeded. However, your page still looks the same because your application logic isn't using this new property yet.
264
266
265
267
#### Use the new property
266
268
@@ -340,7 +342,7 @@ Now that you enabled Code First Migrations in your Azure app, publish your code
340
342
341
343

342
344
343
-
All your existing to-do items are still displayed. When you republish your ASP.NET application, existing data in your SQL Database is not lost. Also, Code First Migrations only changes the data schema and leaves your existing data intact.
345
+
All your existing to-do items are still displayed. When you republish your ASP.NET application, existing data in your SQL Database isn't lost. Also, Code First Migrations only changes the data schema and leaves your existing data intact.
344
346
345
347
## Stream application logs
346
348
@@ -377,7 +379,7 @@ Each action starts with a `Trace.WriteLine()` method. This code is added to show
377
379
> [!TIP]
378
380
> You can experiment with different trace levels to see what types of messages are displayed for each level. For example, the **Information** level includes all logs created by `Trace.TraceInformation()`, `Trace.TraceWarning()`, and `Trace.TraceError()`, but not logs created by `Trace.WriteLine()`.
379
381
380
-
1. In your browser navigate to your app again at *http://<your app name>.azurewebsites.net*, then try clicking around the to-do list application in Azure. The trace messages are now streamed to the **Output** window in Visual Studio.
382
+
1. In your browser, navigate to your app again at *http://<your app name>.azurewebsites.net*, then try clicking around the to-do list application in Azure. The trace messages are now streamed to the **Output** window in Visual Studio.
381
383
382
384
```console
383
385
Application: 2017-04-06T23:30:41 PID[8132] Verbose GET /Todos/Index
# Manage the API and runtime versions of App Service authentication
@@ -17,17 +19,17 @@ There are two versions of the management API for App Service authentication. The
17
19
> [!WARNING]
18
20
> Migration to V2 will disable management of the App Service Authentication/Authorization feature for your application through some clients, such as its existing experience in the Azure portal, Azure CLI, and Azure PowerShell. This cannot be reversed.
19
21
20
-
The V2 API does not support creation or editing of Microsoft Account as a distinct provider as was done in V1. Rather, it leverages the converged [Microsoft identity platform](../active-directory/develop/v2-overview.md) to sign-in users with both Azure AD and personal Microsoft accounts. When switching to the V2 API, the V1 Azure Active Directory (Azure AD) configuration is used to configure the Microsoft identity platform provider. The V1 Microsoft Account provider will be carried forward in the migration process and continue to operate as normal, but it is recommended that you move to the newer Microsoft Identity Platform model. See [Support for Microsoft Account provider registrations](#support-for-microsoft-account-provider-registrations) to learn more.
22
+
The V2 API doesn't support creation or editing of Microsoft Account as a distinct provider as was done in V1. Rather, it uses the converged [Microsoft identity platform](../active-directory/develop/v2-overview.md) to sign-in users with both Azure AD and personal Microsoft accounts. When switching to the V2 API, the V1 Azure Active Directory (Azure AD) configuration is used to configure the Microsoft identity platform provider. The V1 Microsoft Account provider will be carried forward in the migration process and continue to operate as normal, but you should move to the newer Microsoft Identity Platform model. See [Support for Microsoft Account provider registrations](#support-for-microsoft-account-provider-registrations) to learn more.
21
23
22
24
The automated migration process will move provider secrets into application settings and then convert the rest of the configuration into the new format. To use the automatic migration:
23
25
24
26
1. Navigate to your app in the portal and select the **Authentication** menu option.
25
27
1. If the app is configured using the V1 model, you'll see an **Upgrade** button.
26
-
1. Review the description in the confirmation prompt. If you're ready to perform the migration, click**Upgrade** in the prompt.
28
+
1. Review the description in the confirmation prompt. If you're ready to perform the migration, select**Upgrade** in the prompt.
27
29
28
30
### Manually managing the migration
29
31
30
-
The following steps will allow you to manually migrate the application to the V2 API if you do not wish to use the automatic version mentioned above.
32
+
The following steps will allow you to manually migrate the application to the V2 API if you don't wish to use the automatic version mentioned above.
31
33
32
34
#### Moving secrets to application settings
33
35
@@ -63,9 +65,9 @@ The following steps will allow you to manually migrate the application to the V2
63
65
> [!NOTE]
64
66
> The application settings for this configuration should be marked as slot-sticky, meaning that they will not move between environments during a [slot swap operation](./deploy-staging-slots.md). This is because your authentication configuration itself is tied to the environment.
65
67
66
-
1. Create a new JSON file named `authsettings.json`. Take the output that you received previously and remove each secret value from it. Write the remaining output to the file, making sure that no secret is included. In some cases, the configuration may have arrays containing empty strings. Make sure that `microsoftAccountOAuthScopes`does not, and if it does, switch that value to `null`.
68
+
1. Create a new JSON file named `authsettings.json`. Take the output that you received previously and remove each secret value from it. Write the remaining output to the file, making sure that no secret is included. In some cases, the configuration may have arrays containing empty strings. Make sure that `microsoftAccountOAuthScopes`doesn't, and if it does, switch that value to `null`.
67
69
68
-
1. Add a property to `authsettings.json`which points to the application setting name you created earlier for each provider:
70
+
1. Add a property to `authsettings.json`that points to the application setting name you created earlier for each provider:
69
71
70
72
* Azure AD: `clientSecretSettingName`
71
73
* Google: `googleClientSecretSettingName`
@@ -137,10 +139,10 @@ You've now migrated the app to store identity provider secrets as application se
137
139
138
140
#### Support for Microsoft Account provider registrations
139
141
140
-
If your existing configuration contains a Microsoft Account provider and does not contain an Azure AD provider, you can switch the configuration over to the Azure AD provider and then perform the migration. To do this:
142
+
If your existing configuration contains a Microsoft Account provider and doesn't contain an Azure AD provider, you can switch the configuration over to the Azure AD provider and then perform the migration. To do this:
141
143
142
144
1. Go to [**App registrations**](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) in the Azure portal and find the registration associated with your Microsoft Account provider. It may be under the "Applications from personal account" heading.
143
-
1. Navigate to the "Authentication" page for the registration. Under "Redirect URIs" you should see an entry ending in `/.auth/login/microsoftaccount/callback`. Copy this URI.
145
+
1. Navigate to the "Authentication" page for the registration. Under "Redirect URIs", you should see an entry ending in `/.auth/login/microsoftaccount/callback`. Copy this URI.
144
146
1. Add a new URI that matches the one you just copied, except instead have it end in `/.auth/login/aad/callback`. This will allow the registration to be used by the App Service Authentication / Authorization configuration.
145
147
1. Navigate to the App Service Authentication / Authorization configuration for your app.
146
148
1. Collect the configuration for the Microsoft Account provider.
Copy file name to clipboardExpand all lines: articles/app-service/configure-authentication-file-based.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,13 @@ description: Configure authentication and authorization in App Service using a c
4
4
ms.topic: article
5
5
ms.date: 07/15/2021
6
6
ms.custom: AppServiceIdentity
7
+
author: cephalin
8
+
ms.author: cephalin
7
9
---
8
10
9
11
# File-based configuration in Azure App Service authentication
10
12
11
-
With [App Service authentication](overview-authentication-authorization.md), the authentication settings can be configured with a file. You may need to use file-based configuration to use certain preview capabilities of App Service authentication / authorization before they are exposed via [Azure Resource Manager](../azure-resource-manager/management/overview.md) APIs.
13
+
With [App Service authentication](overview-authentication-authorization.md), the authentication settings can be configured with a file. You may need to use file-based configuration to use certain preview capabilities of App Service authentication / authorization before they're exposed via [Azure Resource Manager](../azure-resource-manager/management/overview.md) APIs.
12
14
13
15
> [!IMPORTANT]
14
16
> Remember that your app payload, and therefore this file, may move between environments, as with [slots](./deploy-staging-slots.md). It is likely you would want a different app registration pinned to each slot, and in these cases, you should continue to use the standard configuration method instead of using the configuration file.
@@ -17,7 +19,7 @@ With [App Service authentication](overview-authentication-authorization.md), the
17
19
18
20
1. Create a new JSON file for your configuration at the root of your project (deployed to D:\home\site\wwwroot in your web / function app). Fill in your desired configuration according to the [file-based configuration reference](#configuration-file-reference). If modifying an existing Azure Resource Manager configuration, make sure to translate the properties captured in the `authsettings` collection into your configuration file.
19
21
20
-
2. Modify the existing configuration, which is captured in the [Azure Resource Manager](../azure-resource-manager/management/overview.md) APIs under `Microsoft.Web/sites/<siteName>/config/authsettingsV2`. To modify this, you can use an [Azure Resource Manager template](../azure-resource-manager/templates/overview.md) or a tool like [Azure Resource Explorer](https://resources.azure.com/). Within the authsettingsV2 collection, you will need to set two properties (and may remove others):
22
+
2. Modify the existing configuration, which is captured in the [Azure Resource Manager](../azure-resource-manager/management/overview.md) APIs under `Microsoft.Web/sites/<siteName>/config/authsettingsV2`. To modify it, you can use an [Azure Resource Manager template](../azure-resource-manager/templates/overview.md) or a tool like [Azure Resource Explorer](https://resources.azure.com/). Within the authsettingsV2 collection, set two properties (you may remove others):
21
23
22
24
1. Set `platform.enabled` to "true"
23
25
2. Set `platform.configFilePath` to the name of the file (for example, "auth.json")
@@ -29,7 +31,7 @@ Once you have made this configuration update, the contents of the file will be u
29
31
30
32
## Configuration file reference
31
33
32
-
Any secrets that will be referenced from your configuration file must be stored as [application settings](./configure-common.md#configure-app-settings). You may name the settings anything you wish. Just make sure that the references from the configuration file uses the same keys.
34
+
Any secrets that will be referenced from your configuration file must be stored as [application settings](./configure-common.md#configure-app-settings). You may name the settings anything you wish. Just make sure that the references from the configuration file use the same keys.
33
35
34
36
The following exhausts possible configuration options within the file:
0 commit comments