Setting a storage account's "Allow storage account key access" to disabled breaks function deployments.

Demougin, Matthew W 25 Reputation points
2025-03-10T20:30:46.78+00:00

I've been requested to disable storage account key access on a set of storage accounts. Doing so results in an inability to deploy the azure function that is connected to the storage account.

When the account is set to enable storage account key access it works.

User's image

User's image

User's image

When I switch to Disabled, it breaks:

User's image

User's image

User's image

It has the following error:

User's image

This URL leads toUser's image

because disable also disconnects the storage account and function

User's image

It's hard for me to believe that this combination simply doesn't work in Azure. Any help getting this setup would be greatly appreciated.

Thanks!

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,539 questions
{count} votes

Accepted answer
  1. Silvia Wibowo 6,046 Reputation points Microsoft Employee Volunteer Moderator
    2025-03-24T06:10:32.9666667+00:00

    Hi @Demougin, Matthew W , based on your statement, I understand that your Azure Functions:

    1. Uses Azure Blob Storage with HNS enabled.
    2. Deploys website files to Azure Files.

    #1 use case: HNS-enabled Azure Blob Storage supports authentication based on managed identity.

    #2 use case: Azure Files doesn't support using managed identity when accessing the file share. It needs to use storage account connection string, which is based on storage account keys.

    Because of #2, you need to configure an exception in MDFC (Microsoft Defender for Cloud) that all storage accounts related to Azure Functions that uses Azure Files, need to allow access to storage account keys. That's a requirement for Azure Files to work.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.