Remediation
From Azure Portalβ
- From Azure Home select the Portal Menu.
- Select
Microsoft Defender for Cloud
. - Under
Management
, selectEnvironment Settings
. - Select the subscription.
- Select
Integrations
. - Check
Allow Microsoft Defender for Cloud Apps to access my data
. - Select
Save
.
From Azure CLIβ
Use the below command to set Allow Microsoft Defender for Cloud Apps to access my data
:
az account get-access-token --query "{subscription:subscription,accessToken:accessToken}" --out tsv | xargs -L1 bash -c 'curl -X PUT -H "Authorization: Bearer $1" -H "Content-Type: application/json" https://management.azure.com/subscriptions/<subscription_ID>/providers/Microsoft.Security/settings/MCAS?api-version=2021-06-01 -d@"input.json"'
Where input.json
contains the Request body json data as mentioned below:
{
"id": "/subscriptions/<Your_Subscription_Id>/providers/Microsoft.Security/settings/MCAS",
"kind": "DataExportSetting",
"type": "Microsoft.Security/settings",
"properties": {
"enabled": true
}
}