Home › Studies › AZ-104 › Storage › Storage Encryption

Storage Encryption

Service-side encryption · customer-managed keys · infrastructure encryption · encryption scopes

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Key options

OptionWho holds the keyScopeNotes
Microsoft-managed keysMicrosoft (rotates them)Account (default), container or blob (through an encryption scope), all servicesDefault for every new account
Customer-managed keys (CMK)You, in Azure Key Vault or Managed HSM; you rotateAccount (default), or container or blob through an encryption scopeBlob and Files by default; queues and tables need an account created with All service types
Customer-provided keysYou; the client sends the key on each requestIndividual Blob Storage requestsBlob Storage only. Azure doesn't store the key
Infrastructure encryptionMicrosoftA second layer with a different algorithm and keySet only at account creation

Customer-managed keys: requirements

StepAction
1Create or choose a key vault with purge protection (soft delete on)
2Give yourself Key Vault Crypto Officer and create an RSA key
3Choose a managed identity for the account
4Grant that identity Key Vault Crypto Service Encryption User on the vault
5Storage account › Security + networking › Encryption › Customer-managed keys: select vault, key and identity, then Save

Infrastructure encryption

Encryption scopes (Blob only)

CLI and PowerShell

TaskAzure CLIPowerShell
Create a vault with purge protection and RBACaz keyvault create --name <kv> --resource-group <rg> --location <loc> --enable-purge-protection --enable-rbac-authorizationNew-AzKeyVault -Name <kv> -ResourceGroupName <rg> -Location <loc> -EnablePurgeProtection -EnableRbacAuthorization
Create a keyaz keyvault key create --name <key> --vault-name <kv>Add-AzKeyVaultKey -VaultName <kv> -Name <key> -Destination Software
Assign a system identity to the accountaz storage account update --name <n> --resource-group <rg> --assign-identitySet-AzStorageAccount -ResourceGroupName <rg> -Name <n> -AssignIdentity
Enable CMK (automatic version)az storage account update ... --encryption-key-name <key> --encryption-key-version "" --encryption-key-source Microsoft.Keyvault --encryption-key-vault <vaultUri>Set-AzStorageAccount ... -KeyvaultEncryption -KeyName <key> -KeyVersion "" -KeyVaultUri <uri>
Back to Microsoft-managed keysaz storage account update ... --encryption-key-source Microsoft.StorageSet-AzStorageAccount ... -StorageEncryption
Revoke (disable the key)az keyvault key set-attributes --vault-name <kv> --name <key> --enabled falseUpdate-AzKeyVaultKey -VaultName <kv> -Name <key> -Enable $false
Create an account with infrastructure encryptionaz storage account create ... --require-infrastructure-encryptionNew-AzStorageAccount ... -RequireInfrastructureEncryption
Create an encryption scope (Microsoft key)az storage account encryption-scope create --resource-group <rg> --account-name <n> --name <scope> --key-source Microsoft.StorageNew-AzStorageEncryptionScope -ResourceGroupName <rg> -StorageAccountName <n> -EncryptionScopeName <scope> -StorageEncryption
Create an encryption scope (CMK)... --key-source Microsoft.KeyVault --key-uri <uri>New-AzStorageEncryptionScope ... -KeyUri <uri> -KeyvaultEncryption
Container with default scope, no overrideaz storage container create --account-name <n> --name <c> --default-encryption-scope <scope> --prevent-encryption-scope-override true --auth-mode loginNew-AzStorageContainer -Name <c> -Context $ctx -DefaultEncryptionScope <scope> -PreventEncryptionScopeOverride $true
Upload a blob with a scopeaz storage blob upload ... --encryption-scope <scope>Set-AzStorageBlobContent ... -EncryptionScope <scope>
Disable a scopeaz storage account encryption-scope update ... --state DisabledUpdate-AzStorageEncryptionScope ... -State disabled

Exam Tips

Tick each tip once you can answer it without looking.

“Is data in a new storage account encrypted?” → Yes, always, with Microsoft-managed keys; it can't be turned off. Trap: enabling encryption in Configuration.

“The customer must control and rotate the keys” → Customer-managed keys in Key Vault. Trap: customer-provided keys are sent by the client on each request and are Blob only.

“Key vault requirements for CMK” → Soft delete and purge protection both enabled. Trap: soft delete alone.

“Which role does the account's managed identity need on the vault?” → Key Vault Crypto Service Encryption User. Trap: Key Vault Contributor or Reader.

“New account configured with CMK at creation: which identity?” → A user-assigned managed identity, created first. Trap: system-assigned.

“Enable double encryption on an existing account” → Not possible: infrastructure encryption is set at creation. Create a new account and copy the data. Trap: a toggle on the Encryption blade.

“Key rotated in the vault, old version disabled at once, access broke” → Storage checks once a day: wait 24 hours, or set the new version manually. Trap: rotation being instant.

“Temporarily block all access to data in a CMK account” → Disable the key in Key Vault. Trap: deleting an account access key: access keys are unrelated.

“Different customers' data in one account, each with its own key” → Encryption scopes. Trap: separate Shared Key access keys.

“Every blob in a container must use the same scope” → Set a default scope and prevent override when you create the container. Trap: changing the container default later.

“Delete an encryption scope” → Not possible: disable it (30-day minimum billing). Trap: a delete command.

“Upload to a container that prevents override, naming a different scope” → The upload fails. Trap: it succeeding with the scope you named.

“CMK for queues and tables” → The account must be created with CMK support for all service types. Trap: enabling it later on the Encryption blade.

“Switch an account from CMK back to Microsoft-managed keys” → Allowed at any time. Trap: recreating the account.

“Key types allowed for CMK” → RSA or RSA-HSM: 2048, 3072 or 4096 bits. Trap: EC keys.

“Move a blob that has an encryption scope to the archive tier” → Not possible. Trap: scopes don't affect tiering.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Storage AccessObject Replication →