> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/azure-monitor-log-profile-does-not-capture-all-activities.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# Azure Monitor log profile does not capture all activities

### Synopsis

| Field               | Value                                                     |
| ------------------- | --------------------------------------------------------- |
| Rule Type           | Detection                                                 |
| Finding Type        | Azure Monitor log profile does not capture all activities |
| Finding ID          | 60000407                                                  |
| Generates a Finding | This detection rule also generates a finding              |
| Severity            | Informational                                             |
| Category            | CONFIGURATION                                             |
| Cloud Providers     | AZURE                                                     |
| Platform Module     | CSPM                                                      |
| Asset Types         | AZURE\_LOG\_PROFILE                                       |
| ATT\&CK Tactic      | TA0112 (TA0112)                                           |
| ATT\&CK Technique   | T1685 (T1685)                                             |

### Description

Azure Monitor log profiles failing to capture all activities present a significant security risk. Incomplete logging hinders threat detection and incident response, leaving critical events unmonitored.

The Azure Monitor service allows configuring log profiles to specify which activity log categories are exported. Failing to include 'Write', 'Delete', and 'Action' categories leaves gaps in the audit trail. Attackers could exploit this by performing malicious actions without leaving detectable traces within the logs. This lack of comprehensive logging impedes security investigations and incident response efforts.

A misconfiguration resulting in incomplete logging exposes the environment to undetected attacks, data breaches, and regulatory non-compliance. Comprehensive logging provides a complete record of all management plane activities, enabling timely detection of suspicious behavior and facilitating thorough incident response. This ensures accountability and aids in meeting compliance requirements.

To mitigate this, ensure all Azure Monitor log profiles include 'Write', 'Delete', and 'Action' categories. Regularly review and update log profiles to reflect evolving security needs. Consider enabling diagnostic settings for relevant resources to capture more granular operational data, supplementing activity log data for a holistic view.

### Remediation

**Manual steps:**

Azure Log Profile - Manual remediation steps:

On the Azure Portal, there is no provision to check or set categories. However, when a log profile is created using the Azure Portal, Write, Delete and Action categories are set by default.

Log profile activities can be set only through CLI using REST API and CLI is:

1. To list the Log profile run,

   ```
   az monitor log-profiles list
   ```
2. Note the name of reported log profile and replace it with \<LOG\_PROFILE\_NAME> in below command:

   ```
   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.insights/logprofiles/<LOG_PROFILE_NAME>?api-version=2016-03-01' | jq
   ```

   Copy the JSON output and save it as 'input.json' file.
3. Edit the saved 'input.json' file to add all activities 'Write', 'Delete' and 'Action' in categories JSON array section.
4. Run below command taking 'input.json' as input file,

   ```
   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.insights/logprofiles/<LOG_PROFILE_NAME>?api-version=2016-03-01 -d@"input.json"'
   ```

NOTE: To run all above CLIs you have to be configured with Azure subscription and accessToken locally. And these CLI commands require 'microsoft.insights/logprofiles/\*' permission.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/azure-monitor-log-profile-does-not-capture-all-activities.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
