I've recently had some bug reports of AzureStor 3.6.0 running into problems on RStudio Workbench here. People are able to connect to an Azure storage account on their local machine, but the same code fails when run on Workbench with a 400 error.
This is some sample code from a user which fails in Workbench but succeeds locally:
az_token <-
AzureRMR::get_azure_token(
resource = "https://mystorage.dfs.core.windows.net/",
tenant = tenant,
app = app_id,
password = app_secret,
auth_type = "client_credentials",
use_cache = FALSE
)
blob_endpoint <- AzureStor::storage_endpoint(endpoint = "https://mystorage.dfs.core.windows.net/",
token = az_token)
container <- AzureStor::storage_container(blob_endpoint, cont_name)
adls_files <- AzureStor::list_storage_files(container,
dir = "/folder/subfolder1/subfolder2/",
info = "all",
recursive = TRUE)
Is there something about Workbench that could be causing this error? Is it maybe rewriting URLs or modifying the HTTP headers?