Review Trusted Microsoft Services exceptions

Verify the required Azure service connection and data permissions before selecting a trusted-service exception.

Description

On a network-restricted storage account, AzureServices grants a network exception for specific operations by Microsoft’s listed services. Keep bypass: 'None' when the integration does not depend on that path.

Potential impact

Backup or monitoring can stop if a required access path is missing. Opening the entire account to fix one integration can also expose it to other clients.

Remediation

Confirm that the service and operation qualify. Set bypass: 'AzureServices' only when needed and grant the service minimal data permissions. Review defaultAction, public network access and other exceptions, then verify the operation and its logs. Use a private path if it fits the integration.

Examples

Both excerpts keep the default deny and one allowed subnet. Complete the account definition, supply the actual subnet resource ID and configure the Storage service endpoint required for that subnet rule.

Before

bicep
resource storage 'Microsoft.Storage/storageAccounts@2019-06-01' = {
  name: 'storage'
  properties: {
    networkAcls: {
      bypass: 'None'
      virtualNetworkRules: [
        {
          id: 'id'
          action: 'Allow'
        }
      ]
      defaultAction: 'Deny'
    }
  }
}

After

bicep
resource storage 'Microsoft.Storage/storageAccounts@2019-06-01' = {
  name: 'storage'
  properties: {
    networkAcls: {
      bypass: 'AzureServices'
      virtualNetworkRules: [
        {
          id: 'id'
          action: 'Allow'
        }
      ]
      defaultAction: 'Deny'
    }
  }
}

References