Skip to content

Commit ab20359

Browse files
committed
touchups
1 parent 4e30ebb commit ab20359

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

articles/app-service/configure-basic-auth-disable.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ description: Learn about disabling basic authentication for increased security a
44
author: cephalin
55
ms.author: cephalin
66
ms.topic: how-to
7-
ms.date: 06/02/2025
7+
ms.date: 06/03/2025
88
keywords: azure app service, security, deployment, FTP, MsDeploy
99

1010
---
1111

1212
# Disable basic authentication in Azure App Service deployments
1313

14-
This article discusses how to disable basic username and password authentication for deploying code to Azure App Service apps. The article explains several ways to disable basic authentication, fallback deployment methods if any, and how to monitor basic authentication attempts.
14+
This article discusses how to disable basic username and password authentication for deploying code to Azure App Service apps. The article explains several ways to disable basic authentication, fallback deployment methods if any, and how to monitor basic authentication access attempts.
1515

1616
App Service provides basic authentication for FTP and web deployment clients to connect using username and password deployment credentials. The basic authentication APIs are good for browsing your site's file system, uploading drivers and utilities, and deploying with MSBuild. For more information, see [Configure deployment credentials for Azure App Service](deploy-configure-credentials.md).
1717

@@ -21,7 +21,7 @@ Microsoft Entra also lets you deploy from other Azure services by using managed
2121

2222
## Prerequisites
2323

24-
- To disable using basic authentication for FTP access to an app, you must have owner-level access to the app.
24+
- To disable basic authentication for FTP access to an app, you must have owner-level access to the app.
2525
- To create and assign a role to prevent lower-privileged users from enabling basic authentication, you must have **Owner** or **User Access Administrator** permissions in the subscription.
2626

2727
## Disable basic authentication
@@ -33,6 +33,8 @@ For other deployment methods that use basic authentication, such as Visual Studi
3333
>[!NOTE]
3434
>SCM basic authentication is required for enabling FTP basic authentication.
3535
36+
To disable basic authentication:
37+
3638
### [Azure portal](#tab/portal)
3739

3840
1. In the [Azure portal](https://portal.azure.com), search for and select **App Services**, and then select your app.
@@ -45,15 +47,15 @@ For other deployment methods that use basic authentication, such as Visual Studi
4547

4648
### [Azure CLI](#tab/cli)
4749

48-
Run the following Azure CLI commands in the Bash environment of Azure Cloud Shell by selecting **Open Cloud Shell** at the upper right of the code block.
50+
Run the following Azure CLI commands in the Bash environment of Azure Cloud Shell by selecting **Open Cloud Shell** at the upper right of the code block. Copy the code, replace any placeholders, paste it into the Cloud Shell and run it.
4951

5052
To disable FTP basic authentication access, run the following command, replacing the placeholders with your app's resource group and name. You must have owner-level access to the app.
5153

5254
```azurecli-interactive
5355
az resource update --resource-group <group-name> --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/<app-name> --set properties.allow=false
5456
```
5557

56-
To disable basic authentication access for the Web Deploy port and Git deploy `https://\<app-name>.scm.azurewebsites.net`, run the following command. Replace the placeholders with your app's resource group and name.
58+
To disable basic authentication access for the Web Deploy port and Git deploy with `https://<app-name>.scm.azurewebsites.net`, run the following command. Replace the placeholders with your app's resource group and name.
5759

5860
```azurecli-interactive
5961
az resource update --resource-group <resource-group> --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/<app-name> --set properties.allow=false
@@ -89,7 +91,7 @@ The following table shows how various deployment methods behave when basic authe
8991

9092
### Visual Studio basic authentication disabled warning
9193

92-
Visual Studio requires basic authentication to deploy to Azure App Service. If you disable basic authentication, a Visual Studio warning reminds you that your app configuration changed and you can no longer deploy to your app. Either you disabled basic authentication on the app yourself, or your organization policy disabled basic authentication for App Service apps.
94+
Visual Studio requires basic authentication to deploy to Azure App Service. If a Visual Studio warning states that your app configuration changed and you can no longer deploy to your app, either you disabled basic authentication on the app or your organization policy disabled basic authentication for App Service apps.
9395

9496
## Create a custom role to prevent enabling basic authentication
9597

@@ -106,7 +108,7 @@ To prevent lower-privileged users from enabling basic authentication for any app
106108
1. Select the box for **Write**, and then select **Add**. This step adds the operation to **NotActions** for the role.
107109
1. Select **Exclude permissions** again.
108110
1. Search for and expand **microsoft.web/sites/slots/basicPublishingCredentialsPolicies**, select the **Write** box, and then select **Add**.
109-
1. Your **Permissions** tab should look like the following screenshot. Select **Review + create**, and then select **Create**.
111+
1. Your **Permissions** tab should now look like the following screenshot. Select **Review + create**, and then select **Create**.
110112

111113
:::image type="content" source="media/configure-basic-auth-disable/custom-role-no-basic-auth.png" alt-text="Screenshot that shows excluding Write for basicPublishingCredentialsPolicies.":::
112114

@@ -122,7 +124,7 @@ az role definition create --role-definition '{
122124
"IsCustom": true,
123125
"Description": "Prevents users from enabling basic authentication for all App Service apps or slots.",
124126
"NotActions": [
125-
"Microsoft.Web/sites/basicPublishingCredentialsPolicies/Write"
127+
"Microsoft.Web/sites/basicPublishingCredentialsPolicies/Write",
126128
"Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies/Write"
127129
],
128130
"AssignableScopes": ["/subscriptions/<subscription-guid>"]

0 commit comments

Comments
 (0)