Skip to content

Can't use Azure CLI to Create a Function App from Within the same Script that the Storage Account was Created In #32019

@nlaymon1980

Description

@nlaymon1980

Describe the bug

Azure cli is failing to create a function app using an EP1 App Service Plan from within the same script that creates the associated storage account. We are receiving the following error

ERROR: Creation of storage file share failed with: 'The remote server returned an error: (403) Forbidden.'. Please check if the storage account is accessible.

We have verified that the network rules of the storage account allow the VNet of the App Service Plan and the Cloud Shell IP Address.

The only workaround found was to save the networking rules of the storage account from the Azure Portal after the storage account was created and before the function app create command.

Microsoft Case #2506050040013371 was opened for this issue.

Related command

az functionapp create -n xxx-functionapp-qa -g xxx-qa --plan xxx-fa1-l-qa --app-insights xxx-fa-qa-appinsights --storage-account xxxqa --functions-version 4 --runtime python --runtime-version 3.11 --vnet xxx-vnet-qa --subnet subnet-fa1 --https-only true --only-show-errors

Errors

ERROR: Creation of storage file share failed with: 'The remote server returned an error: (403) Forbidden.'. Please check if the storage account is accessible.

Issue script & Debug output

ERROR: Creation of storage file share failed with: 'The remote server returned an error: (403) Forbidden.'. Please check if the storage account is accessible.

Expected behavior

Function App should be created as well as the File Share in the storage account.

Environment Summary

azure-cli 2.76.0

core 2.76.0
telemetry 1.1.0

Extensions:
application-insights 1.2.3
ml 2.38.0
ssh 2.0.6

Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0

Extensions system directory '/usr/lib/python3.12/site-packages/azure-cli-extensions'

Python (Linux) 3.12.9 (main, Jul 29 2025, 01:30:13) [GCC 13.2.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

Microsoft Case #2506050040013371 was opened for this issue.

Metadata

Metadata

Labels

Auto-AssignAuto assign by botFunctionsaz functionappService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions