More Info:
Ensure that Microsoft Defender for Cloud is enabled for Azure App Service instances.Risk Level
HighAddress
Security, Operational MaturityCompliance Standards
CISAZURE, CBP, HITRUSTTriage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate the misconfiguration “Enable Microsoft Defender for Cloud for App Service Instances” in Azure using the Azure console, please follow these steps:
- Open the Azure portal and navigate to the App Service instance for which you want to enable Microsoft Defender for Cloud.
- Click on “Security” from the left-hand menu and then click on “Security Center” from the sub-menu.
- In the Security Center, click on “Recommendations” from the left-hand menu.
- Search for the recommendation “Enable Microsoft Defender for Cloud for App Service Instances” in the list of recommendations.
- Click on the recommendation to view the details.
- Click on the “Remediate” button to remediate the recommendation.
- In the “Remediate” pane, select the subscription, resource group, and App Service instance for which you want to enable Microsoft Defender for Cloud.
- Click on the “Remediate” button to enable Microsoft Defender for Cloud for the selected App Service instance.
- Once the remediation is complete, the recommendation status will change to “Compliant”.
Using CLI
Using CLI
To enable Microsoft Defender for Cloud for App Service Instances in Azure using Azure CLI, you can follow these steps:
- Open the Azure CLI command prompt.
-
Log in to your Azure account using the following command:
-
Select the subscription that contains the App Service Instance you want to enable Microsoft Defender for Cloud for using the following command:
-
Enable Microsoft Defender for Cloud for the App Service Instance using the following command:
This command sets the
siteAuthEnabledproperty of the App Service Instance totrue, which enables Microsoft Defender for Cloud. -
Verify that Microsoft Defender for Cloud is enabled for the App Service Instance using the following command:
This command returns the value
trueif Microsoft Defender for Cloud is enabled for the App Service Instance.
Using Python
Using Python
To enable Microsoft Defender for Cloud for App Service Instances in Azure using Python, follow these steps:After executing these steps, Microsoft Defender for Cloud will be enabled for the App Service Instance in Azure.
- Import the necessary libraries:
- Authenticate using Azure credentials:
- Get the current site configuration:
- Enable Microsoft Defender for Cloud by setting the
webSiteManagementEndpointEnabledproperty toTrue:
- Update the site configuration:

