Subscription not found when creating function app with trial account
See original GitHub issueDoes this occur consistently? Repro steps:
Action: azureFunctions.createFunctionApp Error type: SubscriptionNotFound Error Message: Subscription redacted:id was not found.
Version: 1.7.4 OS: win32 OS Release: 10.0.22000 Product: Visual Studio Code Product Version: 1.69.2 Language: en
Call Stack
handleErrorResponse extension.bundle.js:2:1823131
deserializeResponseBody extension.bundle.js:2:1823862
Issue Analytics
- State:
- Created a year ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Error "Subscription was not found" when trying to create Azure ...
Now that the subscription is not empty, It will be able to identify your subscription id. Additionally, confirm that your Azure free trial...
Read more >Azure free trial subscription not found in VS Code
When trying to deploy a bootleg web app in VS Code, the application prompts the following notification "No subscriptions were found. Set up...
Read more >Cannot find Azure subscription - Visual Studio Feedback
In my account profile at my.visualstudio.com, I activated my free 30 Azure trial, specifying an email address, giving a credit card, and getting...
Read more >Chapter 4. Getting Started with Microsoft Azure Functions
App name. This name will also be used for the URL of the resources you create in the Function App. Subscription. The payment...
Read more >Build an v4 Azure Function that runs as an isolated process ...
If you don't have one, you can get a Microsoft 365 developer subscription when ... If you follow this tutorial you end up...
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 Free
Top 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

I’ve tested this and found it reproducible. With a previously existing account, I could create a function app through VS Code with no problems. I created a new Azure account, signed out in VS Code from the old one, signed in with the new. Then, no matter what region I chose, I got the Subscription … not found error when trying to create a new function app.
The only way I could get past this was to create a new function app through the Azure portal. Even then, there are problems. New function apps created using new Azure accounts do not have the option to add storage accounts to the function app. I don’t know why this is, but perhaps has something to do with the new version of storage accounts that was released recently.
What happens when you try to use the Azure extension to deploy a function to a function app created without any storage is this:
What I did to get past this: Add the storage account manually. You can do this in the Azure portal by going to Storage accounts, and creating one with default options. Then find the Access key for that storage account and copy the connection string. There are two access keys, I used the first one. Then go to the function app’s Configuration panel, and add a new Application Setting with the name of AzureWebJobsStorage and the value of the connection string, then click Save. Make sure to click Save!
After this, deploying a function to that function app from the VS Code Azure extension worked for me.
Just wanted to let you know that I tested again. Azure wasn’t happy with me creating so many new accounts, so I had to use the same one I used previously (created after the bug started happening) but deleted all resource groups on it except DefaultResourceGroup-CUS, and the storage account I’d manually created on it, to hopefully mimic a new account. Uninstalled Azure Functions extension and reinstalled. Went through all the steps to create a function app and deploy a function - works perfectly, just as before! Thanks again!