Я пытался связать хранилище Azure Data Lakes в R, используя следующий код, полученный как The access token is not provided in the 'Authorization' header
install.packages("httr")
install.packages("jsonlite")
install.packages("curl")
library(httr)
library(jsonlite)
library(curl)
h <- new_handle()
handle_setform(h,
"grant_type"="client_credentials",
"resource"="https://management.core.windows.net/",
"client_id"="Application_ID",
"client_secret"="Client_Secret")
req <- curl_fetch_memory("https://login.windows.net/3977e63c-42bc-4e42-9204-905502b6be1e/oauth2/token", handle = h)
res <- fromJSON(rawToChar(req$content))
r <- httr::GET("https://us2biglobaladlsprd001.azuredatalakestore.net/webhdfs/v1/?op=LISTSTATUS", add_headers(Authorization = paste(res$token_type,res$access_token)))
jsonlite::toJSON(jsonlite::fromJSON(content(r,"text")), pretty = TRUE)