quarkusio/quarkus · error · IllegalArgumentException
Path must be set if using file auth config
Error message
Path must be set if using file auth config
What it means
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.
Source
Thrown at extensions/azure-functions/deployment/src/main/java/io/quarkus/azure/functions/deployment/AzureFunctionsConfig.java:251
* Client or App Id required if using <i>managed_identity</i> type
*/
Optional<String> client();
/**
* Tenant ID required if using <i>oauth2</i> or <i>device_code</i> type
*/
Optional<String> tenant();
private static String findValue(Properties props, String key) {
if (props.contains(key))
return (String) props.get(key);
return (String) props.get("quarkus.azure-functions.auth." + key);
}
private static AuthConfiguration fromFile(Optional<String> path) {
try {
if (path.isEmpty()) {
throw new IllegalArgumentException("Path must be set if using file auth config");
}
File file = new File(path.get());
if (!file.exists()) {
throw new IllegalArgumentException("Auth config file not found: " + path.get());
}
Properties props = new Properties();
props.load(new FileInputStream(file));
String typeVal = findValue(props, "type");
if (typeVal == null) {
throw new IllegalArgumentException("Auth config file does not define type: " + path);
}
final AuthType type = AuthType.parseAuthType(typeVal);
final AuthConfiguration authConfiguration = new AuthConfiguration(type);
authConfiguration.setClient(findValue(props, "client"));
authConfiguration.setTenant(findValue(props, "tenant"));
authConfiguration.setCertificate(findValue(props, "certificate"));
authConfiguration.setCertificatePassword(findValue(props, "certificate-password"));View on GitHub (pinned to e1c734241f)
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
Example fix
<!-- before -->
<quarkus.azure-functions.auth.file>true</quarkus.azure-functions.auth.file>
<!-- after -->
<quarkus.azure-functions.auth.file>true</quarkus.azure-functions.auth.file>
<quarkus.azure-functions.auth.path>${project.basedir}/azure.auth.properties</quarkus.azure-functions.auth.path> Defensive patterns
Strategy: validation
Validate before calling
String path = System.getProperty("quarkus.azure-functions.auth.path", "");
if (fileAuthEnabled && (path == null || path.isBlank())) {
throw new IllegalArgumentException("quarkus.azure-functions.auth.path must be set");
} Try / catch
try {
deploy();
} catch (BuildException e) {
if (e.getMessage().contains("Path must be set")) {
// add quarkus.azure-functions.auth.path to pom and retry
}
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Please config the <appName> in pom.xml.
- Please config the <resourceGroup> in pom.xml.
- Auth config file not found: ${path}
- Auth config file does not define type: ${path}
- Failed to parse removed resource '${entry.key}=${entry.resou
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/38d7abd5303a27e7.
Report an issue: GitHub.