01 Run account list command (Windows/macOS/Linux) with custom output filters to list the IDs of the cloud subscriptions available in your Azure cloud account:
az account list
--query '[*].id'
02 The command output should return the requested subscription identifiers (IDs):
[
"abcdabcd-1234-abcd-1234-abcdabcdabcd",
"abcd1234-abcd-1234-abcd-abcd1234abcd"
]
03 Run account set command (Windows/macOS/Linux) with the ID of the Azure cloud subscription that you want to access as the identifier parameter to set the selected subscription to be the current active subscription (the command does not produce an output):
az account set
--subscription abcdabcd-1234-abcd-1234-abcdabcdabcd
04 To enable the Standard Tier for Defender CSPM in the selected Azure subscription, run security pricing create command (Windows/macOS/Linux) with the --name command parameter set to CloudPosture:
az security pricing create
--name CloudPosture
--tier standard
05 The command output should return the configuration information available for the Defender CSPM plan:
{
"deprecated": null,
"enablementTime": "2024-07-29T09:48:54.390561+00:00",
"extensions": [
{
"additionalExtensionProperties": null,
"isEnabled": "True",
"name": "SensitiveDataDiscovery",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"additionalExtensionProperties": null,
"isEnabled": "True",
"name": "ContainerRegistriesVulnerabilityAssessments",
"operationStatus": null
},
{
"additionalExtensionProperties": null,
"isEnabled": "True",
"name": "AgentlessDiscoveryForKubernetes",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"additionalExtensionProperties": {
"ExclusionTags": "[]"
},
"isEnabled": "True",
"name": "AgentlessVmScanning",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"additionalExtensionProperties": null,
"isEnabled": "False",
"name": "EntraPermissionsManagement",
"operationStatus": null
}
],
"freeTrialRemainingTime": "25 days, 1:49:00",
"id": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/providers/Microsoft.Security/pricings/CloudPosture",
"name": "CloudPosture",
"pricingTier": "Standard",
"replacedBy": null,
"subPlan": null,
"type": "Microsoft.Security/pricings"
}
06 Run security pricing create command (Windows/macOS/Linux) to enable the Standard Tier for the Azure resource types supported by Microsoft Defender for Cloud, selected in the conformity rule settings. Use the security pricing list command to describe the name of each resource type supported by Microsoft Defender for Cloud. The following command example enables Standard Tier for virtual machine (VM)servers in the selected subscription:
az security pricing create
--name VirtualMachines
--tier standard
07 The command output should return the configuration information available for modified plan:
{
"deprecated": null,
"enablementTime": "2024-07-29T10:01:46.708481+00:00",
"extensions": [
{
"additionalExtensionProperties": null,
"isEnabled": "False",
"name": "MdeDesignatedSubscription",
"operationStatus": null
},
{
"additionalExtensionProperties": {
"ExclusionTags": "[]"
},
"isEnabled": "True",
"name": "AgentlessVmScanning",
"operationStatus": {
"code": "Succeeded",
"message": "Successfully enabled extension"
}
},
{
"additionalExtensionProperties": null,
"isEnabled": "False",
"name": "FileIntegrityMonitoring",
"operationStatus": null
}
],
"freeTrialRemainingTime": "0:00:00",
"id": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/providers/Microsoft.Security/pricings/VirtualMachines",
"name": "VirtualMachines",
"pricingTier": "Standard",
"replacedBy": null,
"subPlan": "P2",
"type": "Microsoft.Security/pricings"
}
08 Repeat steps no. 3 - 7 for each subscription available in your Microsoft Azure cloud account.