How to replicate DefaultAzureCredential from azure.identity in R

Hello!

I have been tasked to get an Azure token for a project in R. The python team shared how they approach it:

from azure.identity import DefaultAzureCredential

credential = DefaultAzureCredential()

token = credential.get_token("https://example.com")

They said they only need to use the environment variable AZURE_TENANT_ID.

Generally, I use the {AzureAuth} package for handling this, but the get_azure_token() function requires more parameters that the python team did not need to specify with environment variables. The only information about finding an R alternative is in this GitHub issue that asks this question, but there is no clear answer to if a similar approach is available with {AzureAuth}. The original author stopped responding and the package owner advised not to open an issue for this topic and to use SO/Posit Community.

Appreciate any insight on this topic!

Kyle

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.