Remediation
From Azure Consoleβ
- From Azure Home select the Portal Menu.
- Go to
Microsoft Defender for Cloud
. - Under
Management
, selectEnvironment Settings
. - Click on the subscription name.
- Click
Settings & monitoring
. - Set the
Status
forEndpoint protection
toOn
. - Click
Continue
.
From Azure CLIβ
Use the below command to set Allow Microsoft Defender for Endpoint 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/<subscriptionID>/providers/Microsoft.Security/settings/WDATP?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/WDATP",
"kind": "DataExportSettings",
"type": "Microsoft.Security/settings",
"properties": {
"enabled": true
}
}