Encryption at rest: the basics
What does an unencrypted, or under-encrypted, Azure workload actually look like?
Encryption at rest in Azure is not one switch, and the gaps show up in distinct shapes rather than a single setting. Transparent Data Encryption can be off on a SQL database so the files and backups on disk are stored in the clear. A virtual machine can run without host-based encryption, so its temporary disk, its OS and data disk caches, and the data flowing between Compute and Storage are not all encrypted. A storage account can rely on the platform key when a regulated workload is required to hold its own customer-managed key. Each is its own Defender for Cloud recommendation, but the underlying question is the same: is this data encrypted at rest to the standard this workload actually needs?
Microsoft Defender for Cloud turns each of these into its own recommendation under the Microsoft Cloud Security Benchmark data-protection controls, which is why one data-heavy subscription can fail several encryption checks at once. 'Transparent Data Encryption on SQL databases should be enabled', 'Virtual machines should encrypt temp disks, caches, and data flows between Compute and Storage resources', and the 'enable if required' customer-managed-key recommendation on storage accounts read as separate problems on the report, but they are one job: make sure every store of data is encrypted at rest, and that the workloads which need a key you control are using one.
Most of this is nuance rather than negligence. Azure encrypts a great deal at rest by default: Storage accounts are always encrypted with 256-bit AES, and TDE is enabled by default on new SQL databases. So the gaps tend to be the edges: an older SQL database created before TDE was a default, a virtual machine that never had encryption at host turned on, or a regulated workload that needs to move from the platform key to a customer-managed key for separation of duties. The work is to find each of those edges, understand which are genuine requirements rather than defaults, and close them.
In this lesson you will learn how Azure expresses encryption at rest across SQL databases, virtual machine disks and storage accounts, how to find every workload that is under-encrypted for what it holds, and how to close the gaps without taking a regulated workload through an unnecessary key migration. The Controls this lesson covers section lists every Defender for Cloud recommendation in this capability, each linking to a deep page with the exact check and a copy-and-paste fix.
The encryption that was on the whole time
A surprising amount of Azure data is already encrypted at rest the moment you create the resource. Every Azure Storage account is encrypted with 256-bit AES that cannot be turned off, and Transparent Data Encryption has been enabled by default on new Azure SQL databases since 2017. So the irony of this capability is that the failures are usually not 'we forgot to encrypt' but 'we never turned it on for this one older resource' or 'this regulated workload needs a key we control and is still using the platform key'. The default does most of the work; the lesson is about the edges the default does not reach.
Finding under-encrypted workloads across a subscription
Priya is the security lead at a fintech preparing for a SOC 2 Type II audit. Defender for Cloud shows data-protection findings spread across SQL databases and virtual machines in two subscriptions that pre-date the team's current platform standards.
Rather than work the findings one by one, Priya starts by listing which SQL databases still have Transparent Data Encryption switched off, so the genuinely regulated stores can be separated from disposable development databases before anything changes.
Start by finding the SQL databases where Transparent Data Encryption is not enabled. These are the clearest at-rest gaps.
A regulated database with TDE disabled is the highest-value target in this capability. Enable it first, at zero Azure cost.
How Defender for Cloud decides a workload is under-encrypteddeep dive
Each recommendation resolves to a specific property. For SQL, Defender checks the Transparent Data Encryption state on the database: when it is Disabled, the data files, log files and backups are written to disk in the clear, so a stolen backup or disk image is readable. TDE is on by default for new databases, so a finding here almost always means an older database, a restored copy, or one created by a script that disabled it. By default TDE uses a service-managed key; a separate, stronger requirement is to protect the TDE key itself with a customer-managed key in Key Vault for separation of duties.
For virtual machines, the recommendation looks for encryption at host. Azure already encrypts managed OS and data disks at rest with platform-managed keys, but the temporary disk, the OS and data disk caches, and the data flowing between the VM host and Storage are only fully encrypted when encryption at host is enabled. The property is 'securityProfile.encryptionAtHost' on the virtual machine; the feature must first be registered on the subscription as 'Microsoft.Compute/EncryptionAtHost', and the machine must be deallocated to apply it. Encryption at host is the modern replacement for the older guest-based Azure Disk Encryption, which Microsoft is retiring.
For storage accounts, every account is already encrypted at rest with 256-bit AES that cannot be disabled, so the customer-managed-key recommendation is explicitly an 'enable if required' control: it is only a real gap for workloads that are obligated, by contract or regulation, to hold their own key. Configuring it points the account at a key in Azure Key Vault or Managed HSM, and the account's managed identity must be granted the 'Key Vault Crypto Service Encryption User' role so Storage can wrap and unwrap the account encryption key. Defender for Cloud evaluates all of these on a periodic cycle, so a fix does not flip the recommendation to Healthy instantly; the change is immediate but the posture catches up on the next assessment.
What is the impact of leaving data under-encrypted?
The direct impact is readable data outside the running system. A SQL database with TDE off writes its files and backups to disk in the clear, so a copied backup, an exported BACPAC, or a stolen disk image discloses the data without any need to break into the live database. A virtual machine without encryption at host leaves its temporary disk and disk caches unencrypted on the host, and data moving between Compute and Storage is not fully protected in transit at the infrastructure layer. None of this requires a sophisticated attacker; it requires only access to a copy of the storage, which is exactly what backup theft, snapshot sprawl and decommissioning mistakes produce.
The second-order impact is the gap between what you promised and what you can prove. Most data-protection commitments, in contracts, in SOC 2, in ISO 27001 and in the UK and EU data-protection regimes, are stated as 'data is encrypted at rest'. If a single regulated database has TDE off, or a regulated workload that was contractually required to use a customer-managed key is still on the platform key, the promise is broken even though almost everything else is encrypted. That single exception is what an auditor or a breach investigation finds.
On the compliance side, encryption at rest is one of the first controls every framework checks, precisely because it is concrete and verifiable. A passing set of encryption recommendations across every subscription, with the regulated workloads demonstrably on customer-managed keys, is one of the cheapest and most defensible artefacts you can hand an auditor or a security-conscious customer.
How do you close the encryption gaps safely?
Work the capability as one loop rather than chasing individual findings. The order matters: separate the free, universal fixes from the customer-managed-key exceptions before you start, so you do not put a workload through an unnecessary and chargeable key migration.
1. Inventory every workload by encryption gap
List the SQL databases with Transparent Data Encryption off, the virtual machines without encryption at host, and the storage accounts whose workloads have a genuine customer-managed-key requirement. Treat this inventory as the source of truth rather than the Defender finding count, because the three checks span different services and one workload can fail more than one.
2. Separate the free defaults from the customer-managed-key requirements
Enabling TDE and turning on encryption at host are free and should be applied broadly. Adopting a customer-managed key is only required where a contract or regulation demands that you hold your own key. Decide that distinction per workload first, because the customer-managed key is the only part of this capability that carries a recurring Key Vault cost and operational responsibility for key rotation.
3. Close the free gaps, highest sensitivity first
Enable TDE on the SQL databases, prioritising those that hold regulated data, then enable encryption at host on the virtual machines, which requires registering the feature and deallocating each machine in a maintenance window. Each change is immediate at the control plane and adds nothing to the bill.
4. Add customer-managed keys and ratchet it shut with Azure Policy
For the workloads that require it, create a Key Vault with soft delete and purge protection, grant the resource's managed identity the Key Vault Crypto Service Encryption User role, and point the resource at the key. Then assign Azure Policy to audit or deny SQL servers without TDE and to enforce the customer-managed-key requirement on the relevant workloads, so the safe configuration is enforced rather than merely encouraged.
# 1. Free, universal fix: enable Transparent Data Encryption on a SQL database.
az sql db tde set \
--resource-group rg-data \
--server sql-fintech-prod \
--database payments \
--status Enabled
# 2. Free, universal fix: encrypt VM temp disks, caches and data flows.
az feature register --namespace Microsoft.Compute --name EncryptionAtHost
az vm deallocate --resource-group rg-app --name vm-tooling-01
az vm update --resource-group rg-app --name vm-tooling-01 \
--set securityProfile.encryptionAtHost=true
az vm start --resource-group rg-app --name vm-tooling-01
# 3. Only where required: customer-managed key on a storage account.
az storage account update \
--name stbankingprod \
--resource-group rg-data \
--encryption-key-source Microsoft.Keyvault \
--encryption-key-vault "https://kv-banking-cmk.vault.azure.net" \
--encryption-key-name sa-cmk
echo "TDE on, host encryption on, CMK applied to the one regulated store." Quick quiz
Question 1 of 5Defender for Cloud shows findings for TDE on SQL databases, encryption at host on virtual machines and a customer-managed-key recommendation on storage. What is the most efficient way to think about them?
You scored
0 / 5
Keep learning
Go deeper on how Azure expresses encryption at rest across the services in this capability.
- Transparent Data Encryption for Azure SQL Database What TDE protects, the service-managed default, and how to move the protector to a customer-managed key.
- Encryption at host for Azure virtual machine disks How encryption at host covers temporary disks, caches and data flows, and how it differs from Azure Disk Encryption.
- Customer-managed keys for Azure Storage encryption When a customer-managed key is required, how Storage wraps the account key, and the Key Vault permissions involved.
You can now treat encryption at rest as one capability rather than a scatter of findings: inventory the SQL databases, virtual machines and storage accounts that are under-encrypted for what they hold, apply the free fixes (TDE and encryption at host) broadly, reserve customer-managed keys for the workloads that genuinely require them, and ratchet the estate shut with Azure Policy. The Controls this lesson covers section below links every recommendation in this group to its deep page and fix.
Back to the library