Diagram

A four-step process flow showing how to rotate Azure storage account access keys without downtime: switch apps to the secondary key, regenerate the primary key, switch apps to the new primary key, then regenerate the secondary key.
Rotate and Regenerate Access Keys
To rotate keys safely, follow this specific sequence: first, update all connection strings in your applications to reference the secondary access key instead of the primary. Second, regenerate the primary key and wait until your application successfully uses the new key. Third, update connection strings again to reference the new primary key. Finally, regenerate the secondary key so that both keys have been rotated. This approach ensures your applications maintain continuous access to storage throughout the rotation process.
You can enforce rotation reminders by creating a key expiration policy and monitoring compliance with Azure Policy. After setting up the policy, you will receive a reminder when the specified interval elapses. Use Azure Policy's built-in definition Storage account keys should not be expired to audit your accounts and identify any storage accounts with keys that have exceeded your rotation schedule. This integration ensures continuous compliance with your organization's key rotation requirements.
Domain 4 of 5
33 practice questions
Practice this DomainLast updated