az functionapp create gives 400 Bad Request error
See original GitHub issueDescribe the bug Upon attempting to create a function app based on the syntax in the documentation, I receive an error message: “There was a conflict. The remote server returned an error: (400) Bad Request.”
To Reproduce
az functionapp create --name {} --resource-group {} --runtime {} --storage-account {} --plan {}
az functionapp create --name {} --resource-group {} --runtime {} --storage-account {} --consumption-plan-location {}
I have tried this both by specifying a plan and by specifying a consumption plan location - both have the same issue.
Expected behavior A function app should be created.
Environment summary Windows-10-10.0.18362-SP0 Python 3.6.6 Installer: MSI
azure-cli 2.9.1
Additional context The debug output includes a WEBSITE_CONTENTSHARE property in the HTTP PUT request that fails, and I found this bug report while searching for a resolution or workaround: https://github.com/Azure/azure-functions-templates/issues/952
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Bug in Function App naming causing deployment error on the ...
"There was a conflict. The remote server returned an error: (400) Bad Request.". I understand that the limit is maximum 59 characters.
Read more >(400) Bad Request when deploying a Function App via ARM
Error: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING' application setting is missing from your app. This setting contains a connection string for an ...
Read more >Azure App service 400 Bad request! — A STORY | by Roopa V R
So, whats HTTP status Code 400 Bad Request ? the 4XX errors signify that the Client seemed to have Erred. 400 in particular...
Read more >azure api management 400 bad request
An in-depth guide into a 400 Bad Request Error - what it is, what are its causes and how you can solve this...
Read more >All of a sudden getting 400 Bad Request responses ... - Reddit
I've been wrangling weird issues deploying function app code to app services recently ... it's always something it seems. I love Azure, but...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found the bug! I was specifying the --storage-account argument with capital letters (i.e. StorageAccount instead of storageaccount), and the storage accounts API returned the account information anyways, but the account name with capital letters was used to generate the connection strings in the AzureWebJobsStorage and WEBSITE_CONTENTAZUREFILECONNECTIONSTRING app settings, and the web site API returned an HTTP 400. It works fine with the account in all lowercase (technically the correct name.)
Debug log is attached: az-functionapp-create-debug.log
Closing this thread