Forum Discussion
doncommasonofben
Nov 04, 2026Copper Contributor
Policy for "Send scan results to Log Analytics" Microsoft Defender for Storage setting
I am trying to create an Azure Policy to track the "Send scan results to Log Analytics" Microsoft Defender for Storage setting, and unfortunately, having a lot of trouble finding information on the c...
Jamony
Nov 07, 2026MCT
The documented endpoint identifies a diagnostic setting named service attached to DefenderForStorageSettings/current. That full resource ID is different from the resource type used in an Azure Policy lookup; combining both provider types as in your details.type does not describe the diagnostic-settings resource correctly.
Use Microsoft.Insights/diagnosticSettings for the related resource type and service for its name, with the lookup scoped to the Defender for Storage settings resource. Your ScanResults/enabled count is the relevant payload check; compare workspaceId with the intended workspace if a specific destination is required.
If you target DefenderForStorageSettings directly, use mode All. Also account separately for storage accounts without that settings resource, or they will never enter that policy’s evaluation.
Test accounts with logging enabled, disabled, and no Defender settings, and compare the actual resource payloads with compliance details. Check assignment scope and exclusions before attributing the 10% coverage solely to the existence condition.