Using interactive Active Directory/Entra authentication in AuzreStor

#139 · closed · 2 comments

View on GitHub ↗

dvasdekis

Hi folks! [AzureRMR has support for interactive auth](https://cran.r-project.org/web/packages/AzureRMR/vignettes/auth.html), which is super useful in cases like ours where the users have corporate laptops that are members of the domain - it means that the authentication is close to automatic. We're wondering how we would use this same auth method with AzureStor - is there any way to have an interactive window pop up, close when completed, and have that AD token used for subsequent storage blob operations?

Comments

hongooi73

That should actually be the default way to use AzureStor. From the README on the front page: ``` token <- AzureRMR::get_azure_token("https://storage.azure.com", tenant="myaadtenant", app="app_id", password="mypassword")) ad_endp_tok2 <- storage_endpoint("https://mystorage.dfs.core.windows.net", token=token) ``` This interactively obtains a token using AAD/Entra, and uses that to talk to storage. It should all be close to seamless (you'll still have to close the browser tab, which is kind of unavoidable). Let me know if you run into problems.

hongooi73

Actually, I just noticed that the README calls `get_azure_token` from the AzureRMR package... that's outdated now. The function now lives in the AzureAuth package, but not to worry, everything should still work.