Triage and Remediation
Remediation
Using Console
Using Console
To enable Microsoft Defender for Cloud for Key Vaults in Azure using the Azure console, follow these steps:
- Log in to the Azure portal.
- Navigate to the Key Vault that you want to enable Microsoft Defender for Cloud.
- Click on the “Security” tab in the left-hand menu.
- Click on the “Advanced security” button.
- In the “Advanced security” pane, click on the “On” button to enable Microsoft Defender for Cloud.
- Review the terms and conditions, and then click on the “Save” button.
Using CLI
Using CLI
To enable Microsoft Defender for Cloud for Key Vaults in Azure using Azure CLI, follow these steps:
-
Open the Azure CLI and login to your Azure account using the command:
az login
-
Once you are logged in, select the subscription where your Key Vault is located using the command:
az account set --subscription <subscription-id>
-
Next, enable Microsoft Defender for Cloud for Key Vaults using the following command:
az security atp storage enable --storage-type AzureKeyVault
- This will enable Microsoft Defender for Cloud for Key Vaults in your Azure subscription.
Using Python
Using Python
To remediate the misconfiguration of not having Microsoft Defender for Cloud enabled for Key Vaults in Azure using Python, you can follow the below steps:Replace Replace This will enable Microsoft Defender for Cloud on the Key Vault in Azure.
- First, you need to install the Azure SDK for Python using the following command:
- After installation, you need to authenticate with Azure using the following code:
<subscription-id>
with your Azure subscription ID.- Next, you need to get the resource group and Key Vault that you want to enable Microsoft Defender for Cloud on:
<resource-group-name>
and <key-vault-name>
with the names of your resource group and Key Vault.- Finally, you can enable Microsoft Defender for Cloud on the Key Vault using the following code: