Azure Resource Graph (ARG) queries to identify Virtual Machines and Azure Arc machines that may be using TLS 1.0 or 1.1 for Log Analytics agent ingestion.
These queries support the TLS 1.2 enforcement initiative documented by Microsoft:
Best practices for security in Azure Monitor
| File | Scope | Output |
|---|---|---|
azure-aggregate.qry |
Azure VMs (microsoft.compute/virtualmachines) |
Grouped by OS/version/agent with VM count |
azure-detailed.qry |
Azure VMs | Per-VM listing with subscription, resource group, VM name |
arc-aggregate.qry |
Azure Arc machines (microsoft.hybridcompute/machines) |
Grouped by OS/version/agent with machine count |
arc-detailed.qry |
Azure Arc machines | Per-machine listing with subscription, resource group, machine name |
Each query produces a LowTLS column:
| Value | Meaning |
|---|---|
true |
OS is known to not support TLS 1.2 natively — requires remediation or decommission |
unknown |
OS could not be determined from available metadata |
Per Microsoft's documented criteria:
- Windows: XP, Vista, Server 2003, Server 2008 (non-R2 only)
- CentOS: 5.x and earlier
- RHEL: 5.x and earlier
- Ubuntu: 12.x and earlier
- Windows Server 2008 R2 — TLS 1.2 is supported but disabled by default. Requires:
- Install KB3140245
- Set the
DefaultSecureProtocolsregistry key
Note: Results are sorted:
true→registry→unknown→false.
OS detection uses multiple data sources in priority order:
- InstanceView (
properties.extended.instanceView.osName/osVersion) — available for running VMs - Marketplace image (
imageReference.publisher/offer/sku) — parsed for OS family and version - Shared Image Gallery (
imageReference.id) — image name extracted and pattern-matched - OS disk name — last resort fallback; recognizes
WIN/W+ year patterns (e.g.WIN2019-...,W2012R2-...)
OS detection is straightforward since Arc machines self-report:
- osSku (
properties.osSku) — descriptive string like "Windows Server 2019 Standard" or "Red Hat Enterprise Linux 8.10 (Ootpa)" - osName (
properties.osName) — fallback if osSku is empty - Kernel version (
properties.osVersion) —.eltag extraction for RHEL/CentOS identification
Both Azure VM and Arc queries detect the monitoring agent type:
| Agent | Publisher | Extensions |
|---|---|---|
| AMA (Azure Monitor Agent) | Microsoft.Azure.Monitor |
AzureMonitorWindowsAgent, AzureMonitorLinuxAgent |
| MMA (Microsoft Monitoring Agent) | Microsoft.EnterpriseCloud.Monitoring |
MicrosoftMonitoringAgent, OmsAgentForLinux |
VMs/machines with both agents installed are reported as AMA+MMA.
- Open the Azure Resource Graph Explorer
- Paste the contents of any
.qryfile - Select the target scope (management group or subscriptions)
- Run the query
Results can be exported to CSV for further analysis.
- Stopped Azure VMs without a marketplace or SIG image reference fall back to OS disk name, which typically produces
unknownresults. Start the VM or onboard it to Azure Arc for proper detection. - OpenShift cluster nodes appear as
unknownbecause their OS disk names are cluster hash IDs. These run Red Hat CoreOS which supports TLS 1.2. - MMA was deprecated on August 31, 2024. VMs still running MMA-only should be migrated to AMA regardless of TLS status.