{"record":{"id":"38d7abd5303a27e7","repo":"quarkusio/quarkus","slug":"path-must-be-set-if-using-file-auth-config","errorCode":null,"errorMessage":"Path must be set if using file auth config","messagePattern":"Path must be set if using file auth config","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/azure-functions/deployment/src/main/java/io/quarkus/azure/functions/deployment/AzureFunctionsConfig.java","lineNumber":251,"sourceCode":"         * Client or App Id required if using <i>managed_identity</i> type\n         */\n        Optional<String> client();\n\n        /**\n         * Tenant ID required if using <i>oauth2</i> or <i>device_code</i> type\n         */\n        Optional<String> tenant();\n\n        private static String findValue(Properties props, String key) {\n            if (props.contains(key))\n                return (String) props.get(key);\n            return (String) props.get(\"quarkus.azure-functions.auth.\" + key);\n        }\n\n        private static AuthConfiguration fromFile(Optional<String> path) {\n            try {\n                if (path.isEmpty()) {\n                    throw new IllegalArgumentException(\"Path must be set if using file auth config\");\n\n                }\n                File file = new File(path.get());\n                if (!file.exists()) {\n                    throw new IllegalArgumentException(\"Auth config file not found: \" + path.get());\n                }\n                Properties props = new Properties();\n                props.load(new FileInputStream(file));\n                String typeVal = findValue(props, \"type\");\n                if (typeVal == null) {\n                    throw new IllegalArgumentException(\"Auth config file does not define type: \" + path);\n                }\n                final AuthType type = AuthType.parseAuthType(typeVal);\n                final AuthConfiguration authConfiguration = new AuthConfiguration(type);\n                authConfiguration.setClient(findValue(props, \"client\"));\n                authConfiguration.setTenant(findValue(props, \"tenant\"));\n                authConfiguration.setCertificate(findValue(props, \"certificate\"));\n                authConfiguration.setCertificatePassword(findValue(props, \"certificate-password\"));","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/azure-functions/deployment/src/main/java/io/quarkus/azure/functions/deployment/AzureFunctionsConfig.java#L233-L269","documentation":"Azure Functions Maven plugin auth configuration supports reading auth settings from a properties file. If the auth mode is set to file-based, the path to that file must be provided; fromFile throws IllegalArgumentException when the path is empty. This is a build-time (deployment phase) configuration error, not a runtime error.","triggerScenarios":"Running quarkus:deploy (AzureFunctionsDeployCommand) with quarkus.azure-functions.auth config resolved to a file source but quarkus.azure-functions.auth.path (or the file element in pom.xml) unset or empty.","commonSituations":"pom.xml has an auth element with a type/file mode but no path property; property overridden via command line (-Dquarkus.azure-functions.auth.path=) with an empty value; wrong property namespace so the plugin reads an empty value.","solutions":["Set quarkus.azure-functions.auth.path in pom.xml properties to the absolute or relative path of the auth properties file","Verify the property is under quarkus.azure-functions.auth.* and not misspelled","If you intend credentials to come from elsewhere, switch the auth config mode away from file"],"exampleFix":"<!-- before -->\n<quarkus.azure-functions.auth.file>true</quarkus.azure-functions.auth.file>\n<!-- after -->\n<quarkus.azure-functions.auth.file>true</quarkus.azure-functions.auth.file>\n<quarkus.azure-functions.auth.path>${project.basedir}/azure.auth.properties</quarkus.azure-functions.auth.path>","handlingStrategy":"validation","validationCode":"String path = System.getProperty(\"quarkus.azure-functions.auth.path\", \"\");\nif (fileAuthEnabled && (path == null || path.isBlank())) {\n  throw new IllegalArgumentException(\"quarkus.azure-functions.auth.path must be set\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  deploy();\n} catch (BuildException e) {\n  if (e.getMessage().contains(\"Path must be set\")) {\n    // add quarkus.azure-functions.auth.path to pom and retry\n  }\n}","preventionTips":["Always set auth.path together with file-based auth config","Validate the full azure-functions plugin config block before CI deploy","Keep deployment properties in one templated pom section"],"tags":["azure-functions","configuration","maven-plugin"],"backgroundTag":"missing-config-property","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}