Share via

Not able to create function app via az cli

Vincent(Feng Jingsheng) 20 Reputation points
2025-04-11T05:28:45.45+00:00

A few days ago, our pipeline started to report errors.

We attempted to upgrade the version number of az cli from 2.44.1 to 2.71.0.

At the same time, we changed the command az functionapp create from

$script:webApp = az functionapp create --resource-group $targetResourceGroupName --plan $relevantAppServicePlanName --name $fqServiceName --os-type Linux --storage-account $fnAppStorageAccount --runtime dotnet-isolated --runtime-version 8 --functions-version 4 2>$warning

az functionapp config set --resource-group $targetResourceGroupName --name $fqServiceName --linux-fx-version '"DOTNET-ISOLATED|8.0"'

to

$script:webApp = az functionapp create --resource-group $targetResourceGroupName --plan $relevantAppServicePlanName --name $fqServiceName --os-type Linux --storage-account $fnAppStorageAccount --runtime dotnet-isolated --runtime-version 8 --functions-version 4 --linux-fx-version "DOTNET-ISOLATED|8.0" 2>$warning

However, after testing, the function app still cannot be created, and both the warning and webApp are null values.

Please help. Thank you!

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

Answer accepted by question author

Luis Arias 9,536 Reputation points Volunteer Moderator
2025-04-11T09:13:15.3833333+00:00

Hello Vincent,

Welcome to Q&A, Looks like the problem could be coming from two places: the linux-fx-version parameter or your storage account setup (I had similar issues before lets see).

  • To fix the linux-fx-version try to escaping or quoting it properly: Use something like this: --linux-fx-version '"DOTNET-ISOLATED|8.0"'
  • Checking Your Storage Account: I’ve seen cases where the issue was caused by the file service not being enabled on the storage account, which is absolutely essential for Azure Functions. In those situations, enabling the file service immediately resolved the problem. Additionally, there have been cases where the storage account was inaccessible due to network restrictions or firewall rules, leading to similar errors. Making sure your storage account is in the same region as your function app and verifying permissions can help avoid this. And of course, if the storage account is not a general-purpose account, that's another common pitfall. Specialized accounts like BlobStorage or DataLake often cause issues because Azure Functions requires general-purpose accounts.
  • Debugging the Command: If all else fails, use the --debug flag when running your Azure CLI commands

References:

If the information helped address your question, please Accept the answer.

Luis

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

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