# Microsoft Sentinel / Azure Monitor: native IIS logs

Use [private_configuration_requests.kql](private_configuration_requests.kql) in the Log Analytics workspace containing your IIS access logs. The query searches the last 24 hours. It uses the documented `W3CIISLog` table, not a package-defined table or endpoint event.

## Prerequisites and preview

Enable IIS W3C logging. Configure Azure Monitor Agent and an IIS Logs data collection rule with a Log Analytics workspace destination; the standard route writes to `W3CIISLog`. You need permission to query the workspace and normal Azure Monitor ingestion/retention entitlement. Sentinel is optional for a manual Logs hunt; the query installs no analytic rule. See [IIS collection](https://learn.microsoft.com/en-us/azure/azure-monitor/vm/data-collection-iis).

```kusto
W3CIISLog
| where TimeGenerated >= ago(24h)
| take 20
| project TimeGenerated, Computer, csMethod, csUriStem, csUriQuery, cIP, csUserAgent, scStatus
```

Confirm `csUriStem` is the path and `csUriQuery` is separate. The hunt uses `csMethod`, `csUriStem`, and `url_decode`; missing path/method cannot match. It returns `cIP` as recorded and the raw `csUserAgent` without interpreting either as authenticated identity. `csHost` is a client-supplied Host value; use `Computer` and `sSiteName` as receiving-server/site context. Status and bytes are context, with no success-only filter.

References: [native fields](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/w3ciislog), [URL decoding](https://learn.microsoft.com/en-us/kusto/query/url-decode-function?view=microsoft-fabric), and the common [scope, source-IP, and validation limits](../README.md#match-scope-and-compatibility).
