{"record":{"id":"0703289c831ce59a","repo":"quarkusio/quarkus","slug":"you-account-does-not-have-a-subscription-to-deploy","errorCode":null,"errorMessage":"You account does not have a subscription to deploy to","messagePattern":"You account does not have a subscription to deploy to","errorType":"error_code","errorClass":"BuildException","httpStatus":null,"severity":"error","filePath":"extensions/azure-functions/deployment/src/main/java/io/quarkus/azure/functions/deployment/AzureFunctionsDeployCommand.java","lineNumber":321,"sourceCode":"    private static void promptAzureEnvironment(AzureEnvironment env) {\n        if (env != null && env != AzureEnvironment.AZURE) {\n            log.info(AzureString.format(\"Auth environment: %s\", AzureEnvironmentUtils.azureEnvironmentToString(env)));\n        }\n    }\n\n    protected String getTargetSubscriptionId(String defaultSubscriptionId,\n            List<Subscription> subscriptions,\n            List<Subscription> selectedSubscriptions) throws BuildException {\n        if (!StringUtils.isBlank(defaultSubscriptionId)) {\n            return defaultSubscriptionId;\n        }\n\n        if (selectedSubscriptions.size() == 1) {\n            return selectedSubscriptions.get(0).getId();\n        }\n\n        if (selectedSubscriptions.isEmpty()) {\n            throw new BuildException(\"You account does not have a subscription to deploy to\");\n        }\n        throw new BuildException(\"You must specify a subscription id to use for deployment as you have more than one\");\n    }\n\n    protected void printCurrentSubscription(AzureAppService appServiceClient) {\n        if (appServiceClient == null) {\n            return;\n        }\n        final List<Subscription> subscriptions = Azure.az(IAzureAccount.class).account().getSelectedSubscriptions();\n        final Subscription subscription = subscriptions.get(0);\n        if (subscription != null) {\n            log.info(format(SUBSCRIPTION_TEMPLATE, TextUtils.cyan(subscription.getName()),\n                    TextUtils.cyan(subscription.getId())));\n        }\n    }\n\n    protected FunctionAppBase<?, ?, ?> createOrUpdateResource(final FunctionAppConfig config) throws Exception {\n        FunctionApp app = Azure.az(AzureFunctions.class).functionApps(config.subscriptionId()).updateOrCreate(config.appName(),","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/azure-functions/deployment/src/main/java/io/quarkus/azure/functions/deployment/AzureFunctionsDeployCommand.java#L303-L339","documentation":"Raised by AzureFunctionsDeployCommand.getTargetSubscriptionId when no default subscription id was configured and the authenticated Azure account exposes no selected subscription to deploy to. With multiple candidate subscriptions but none selected and no explicit default, there is no way to infer the deployment target, so the command aborts rather than guessing.","triggerScenarios":"Thrown at extensions/azure-functions/deployment/src/main/java/io/quarkus/azure/functions/deployment/AzureFunctionsDeployCommand.java:321 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set an explicit subscription id in the azure-functions plugin configuration","Run 'az login' and select a subscription so the account has a default to use","Grant the authenticated account access to at least one subscription"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}