Search code examples
azureazure-storageaccess-keys

Is it possible to disable storage account access keys?


Is it possible to fully disable access with primary/secondary key to the storage account? I have not found a way to do that. It is possible to do e.g. for Azure SignalR Service.

P.S. I am not looking to disable shared key access


Solution

  • You can disable shared key access from

    1. Azure portal (Settings -> Configuration -> Set "Allow shared key access" to Disabled),
    2. Powershell script
    3. Azure CLI

    See the command below for disabling it using Powershell by setting AllowSharedKeyAccess to false.

    Set-AzStorageAccount -ResourceGroupName <resource-group> `
        -AccountName <storage-account> `
        -AllowSharedKeyAccess $false
    

    Read more about this here