# 2.11 Ensure that 'Automatic provisioning of monitoring agent' is set to 'On'

- Source: https://support.icompaas.com/support/solutions/articles/62000219761-2-11-ensure-that-automatic-provisioning-of-monitoring-agent-is-set-to-on-
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [Azure CIS Benchmark Level 1 & Level 2](https://support.icompaas.com/support/solutions/62000112163) › [2. Security Center](https://support.icompaas.com/support/solutions/folders/62000167545)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

## **Description:**

Enable automatic provisioning of the monitoring agent to collect security data.

  

## **Rationale:**

When the Automatic provisioning of the monitoring agent is turned on, Azure Security Center provisions the Microsoft Monitoring Agent on all existing supported Azure virtual machines and any new ones that are created. The Microsoft Monitoring Agent scans for various security-related configurations and events such as system updates, OS vulnerabilities, endpoint protection, and provides alerts.

  

## **Default Value:**

By default, Automatic provisioning of the monitoring agent is set to On.

  

## **Audit:**

1.  Sign in to your Azure account.
    
2.  Go to Security Center
    
3.  Select Pricing & settings blade
    
4.  Click on the subscription name
5.  Ensure that **Automatic** **provisioning** is set to On  
    If not follow the Implementation steps

  

## **Using Azure Command Line Interface 2.0**

Ensure the output of the below command is On

az account get-access-token --query 
"{subscription:subscription,accessToken:accessToken}" --out tsv | xargs -L1 bash -c 'curl -X GET -H "Authorization: Bearer $1" -H "Content-Type: application/json" 
https://management.azure.com/subscriptions/$0/providers/Microsoft.Security/au toProvisioningSettings?api-version=2017-08-01-preview' | jq '.|.value\[\] | select(.name=="default")'|jq '.properties.autoProvision'

## **Using PowerShell**

Connect-AzAccount
Get-AzSecurityAutoProvisioningSetting

Ensure output for Id Name AutoProvision' is /subscriptions//providers/Microsoft.Security/autoProvisioningSettings/default default On

  

## **Remediation:**

### Pre-Requisite:

1.  An Azure Defender plan for Enhanced security plan (Azure Defender is _free for the first 30 days_. At the end of 30 days, if you choose to continue using the service, you’ll automatically charged for usage).
    

  

### Implementation Steps:

1.  Go to **Security Center**
    
2.  Select **Pricing & settings** blade  
    ![](https://support.icompaas.com/assets/kb/79d6f89f233e1e9d.png)
    
3.  Click on the _subscription name_
    
4.  Set **Automatic provisioning** to On  
    ![](https://support.icompaas.com/assets/kb/93c17089ae1e4cbf.png)
    
5.  Click **save**
    

  

### Backout Plan:

1.  Go to Security Center
    
2.  Click on Pricing & Settings
    
3.  Click on a subscription
    
4.  Click on Data Collection
    
5.  Ensure that Automatic provisioning is set to On(how we can revoke the changes)
    

## **Using Azure Command-Line Interface 2.0**

Use the below command to set Automatic provisioning of monitoring agent to On.

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/$0/providers/Microsoft.Security/au toProvisioningSettings/default?api-version=2017-08-01-preview - d@"input.json"'

Where input.json contains the Request body json data as mentioned below.

{
"id": "/subscriptions/<Your\_Subscription\_Id>/providers/Microsoft.Security/autoProvi sioningSettings/default",
"name": "default",
"type": "Microsoft.Security/autoProvisioningSettings", "properties": {
"autoProvision": "On"
}
}

  

## **Note:**

-   Excluding any of the entries in input.json may disable the specific setting by default
    
-   Microsoft has recently changed APIs to get and Update the Automatic Provisioning Setting. This recommendation is updated accordingly.
    

## **References:**

1.  **[](https://docs.microsoft.com/en-us/azure/security-center/security-center-data-security "https://docs.microsoft.com/en-us/azure/security-center/security-center-data-security")**[](https://docs.microsoft.com/en-us/azure/security-center/security-center-data-security "https://docs.microsoft.com/en-us/azure/security-center/security-center-data-security")[https://docs.microsoft.com/en-us/azure/security-center/security-center-data- security](https://docs.microsoft.com/en-us/azure/security-center/security-center-data-security "https://docs.microsoft.com/en-us/azure/security-center/security-center-data-security")
    
2.  [https://docs.microsoft.com/en-us/azure/security-center/security-center-enable- data-collection](https://docs.microsoft.com/en-us/azure/security-center/security-center-enable-data-collection "https://docs.microsoft.com/en-us/azure/security-center/security-center-enable-data-collection")
    
3.  [https://msdn.microsoft.com/en-us/library/mt704062.aspx](https://msdn.microsoft.com/en-us/library/mt704062.aspx "https://msdn.microsoft.com/en-us/library/mt704062.aspx")

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
