Skill 2.1.4
Manage access keys
Key Concepts
The two 512-bit access keys (key1 and key2) authorize Shared Key requests and sign service and account SAS tokens. Anyone with a key has full access to the account's data, so keys should be stored in Azure Key Vault and rotated regularly. The two keys allow rotation without downtime: move applications to key2, regenerate key1, move them back, then regenerate key2. A key expiration policy sets a rotation reminder interval, and Azure Policy can audit accounts whose keys have not been rotated.
Listing keys requires the Microsoft.Storage/storageAccounts/listkeys/action permission, which Owner, Contributor and Storage Account Contributor have. Setting Allow storage account key access to Disabled blocks Shared Key authorization and every SAS signed with a key, so clients must use Microsoft Entra ID (or a user delegation SAS). Regenerating a key immediately invalidates connections and SAS tokens that use it.