| Environment | Likely Fix |
|-------------|-------------|
| Azure Databricks | Mount with new service principal token: spark.conf.set("fs.azure.account.auth.type", "OAuth") and refresh cluster. |
| Azure Synapse (Serverless) | Check GRANT statements on the external table’s data source. |
| Azure Functions | System-assigned identity may take up to 5 min after first invocation – add retries. |
| Local Dev (VS/CLI) | Run az account get-access-token --resource https://storage.azure.com to see if token is issued. If pending, run az login and re-authenticate. |
// BAD (leads to Status 4) CompletableFuture<Token> future = sdk.getToken(); future.get(30, TimeUnit.SECONDS);
// GOOD CompletableFuture<Token> future = sdk.getToken(); future.orTimeout(30, TimeUnit.SECONDS) .exceptionally(ex -> // Explicitly cancel the SDK's internal callback handle sdk.cancelPendingAuth("adlsdk-status-auth-pending 4"); return fallbackToken; );adlsdk-status-auth-pending 4
If storage account has:
| Environment | Likely Fix |
|-------------|-------------|
| Azure Databricks | Mount with new service principal token: spark.conf.set("fs.azure.account.auth.type", "OAuth") and refresh cluster. |
| Azure Synapse (Serverless) | Check GRANT statements on the external table’s data source. |
| Azure Functions | System-assigned identity may take up to 5 min after first invocation – add retries. |
| Local Dev (VS/CLI) | Run az account get-access-token --resource https://storage.azure.com to see if token is issued. If pending, run az login and re-authenticate. |
// BAD (leads to Status 4) CompletableFuture<Token> future = sdk.getToken(); future.get(30, TimeUnit.SECONDS);
// GOOD CompletableFuture<Token> future = sdk.getToken(); future.orTimeout(30, TimeUnit.SECONDS) .exceptionally(ex -> // Explicitly cancel the SDK's internal callback handle sdk.cancelPendingAuth("adlsdk-status-auth-pending 4"); return fallbackToken; );
If storage account has: