Skip to main content

More Info:

Ensure that Microsoft Defender for Cloud is enabled for Azure App Service instances.

Risk Level

High

Address

Operational Maturity, Security

Compliance Standards

  • CIS AZURE
  • Cloudanix Best Practice
  • HITRUST CSF

Triage and Remediation

Remediation

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:
  1. Open the Azure portal and navigate to the App Service instance for which you want to enable Microsoft Defender for Cloud.
  2. Click on “Security” from the left-hand menu and then click on “Security Center” from the sub-menu.
  3. In the Security Center, click on “Recommendations” from the left-hand menu.
  4. Search for the recommendation “Enable Microsoft Defender for Cloud for App Service Instances” in the list of recommendations.
  5. Click on the recommendation to view the details.
  6. Click on the “Remediate” button to remediate the recommendation.
  7. In the “Remediate” pane, select the subscription, resource group, and App Service instance for which you want to enable Microsoft Defender for Cloud.
  8. Click on the “Remediate” button to enable Microsoft Defender for Cloud for the selected App Service instance.
  9. Once the remediation is complete, the recommendation status will change to “Compliant”.
By following these steps, you can successfully remediate the misconfiguration “Enable Microsoft Defender for Cloud for App Service Instances” in Azure using the Azure console.

To enable Microsoft Defender for Cloud for App Service Instances in Azure using Azure CLI, you can follow these steps:
  1. Open the Azure CLI command prompt.
  2. Log in to your Azure account using the following command:
  3. Select the subscription that contains the App Service Instance you want to enable Microsoft Defender for Cloud for using the following command:
  4. Enable Microsoft Defender for Cloud for the App Service Instance using the following command:
    This command sets the siteAuthEnabled property of the App Service Instance to true, which enables Microsoft Defender for Cloud.
  5. Verify that Microsoft Defender for Cloud is enabled for the App Service Instance using the following command:
    This command returns the value true if Microsoft Defender for Cloud is enabled for the App Service Instance.
That’s it! You have successfully enabled Microsoft Defender for Cloud for the App Service Instance in Azure using Azure CLI.
To enable Microsoft Defender for Cloud for App Service Instances in Azure using Python, follow these steps:
  1. Import the necessary libraries:
  1. Authenticate using Azure credentials:
  1. Get the current site configuration:
  1. Enable Microsoft Defender for Cloud by setting the webSiteManagementEndpointEnabled property to True:
  1. Update the site configuration:
After executing these steps, Microsoft Defender for Cloud will be enabled for the App Service Instance in Azure.
Changing subscription_id on this resource would force replacement; changing tier between Free and Standard is an in-place update.Verification: terraform plan should show an update (or creation) of azurerm_security_center_subscription_pricing.defender_app_services with resource_type = "AppServices" and tier changing from Free (or absent) to Standard.