{"record":{"id":"47d8f95f9cbb5149","repo":"apache/hadoop","slug":"invalid-auth-type-s-is-being-used-expecting-oau","errorCode":null,"errorMessage":"Invalid auth type: %s is being used, expecting OAuth","messagePattern":"Invalid auth type: (.+?) is being used, expecting OAuth","errorType":"validation","errorClass":"TokenAccessProviderException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java","lineNumber":1604,"sourceCode":"                  String.format(\"The configuration value for \\\"%s\\\" is invalid.\", configKey));\n        }\n        CustomTokenProviderAdaptee azureTokenProvider = ReflectionUtils\n                .newInstance(customTokenProviderClass, rawConfig);\n        if (azureTokenProvider == null) {\n          throw new IllegalArgumentException(\"Failed to initialize \" + customTokenProviderClass);\n        }\n        LOG.trace(\"Initializing {}\", customTokenProviderClass.getName());\n        azureTokenProvider.initialize(rawConfig, accountName);\n        LOG.trace(\"{} init complete\", customTokenProviderClass.getName());\n        return new CustomTokenProviderAdapter(azureTokenProvider, getCustomTokenFetchRetryCount());\n      } catch(IllegalArgumentException e) {\n        throw e;\n      } catch (Exception e) {\n        throw new TokenAccessProviderException(\"Unable to load custom token provider class: \" + e, e);\n      }\n\n    } else {\n      throw new TokenAccessProviderException(String.format(\n              \"Invalid auth type: %s is being used, expecting OAuth\", authType));\n    }\n  }\n\n  /**\n   * Returns the SASTokenProvider implementation to be used to generate SAS token.<br>\n   * Users can choose between a custom implementation of {@link SASTokenProvider}\n   * or an in house implementation {@link FixedSASTokenProvider}.<br>\n   * For Custom implementation \"fs.azure.sas.token.provider.type\" needs to be provided.<br>\n   * For Fixed SAS Token use \"fs.azure.sas.fixed.token\" needs to be provided.<br>\n   * In case both are provided, Preference will be given to Custom implementation.<br>\n   * Avoid using a custom tokenProvider implementation just to read the configured\n   * fixed token, as this could create confusion. Also,implementing the SASTokenProvider\n   * requires relying on the raw configurations. It is more stable to depend on\n   * the AbfsConfiguration with which a filesystem is initialized, and eliminate\n   * chances of dynamic modifications and spurious situations.<br>\n   * @return sasTokenProvider object based on configurations provided\n   * @throws AzureBlobFileSystemException if SAS token provider initialization fails","sourceCodeStart":1586,"sourceCodeEnd":1622,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java#L1586-L1622","documentation":"Error \"Invalid auth type: %s is being used, expecting OAuth\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java:1604 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set fs.azure.account.auth.type to OAuth for this configuration, or use the matching auth type settings."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}