AzureR_dir {AzureAuth}R Documentation

Data directory for AzureR packages

Description

Data directory for AzureR packages

Usage

AzureR_dir()

create_AzureR_dir()

Details

AzureAuth can save your authentication credentials in a user-specific directory, using the rappdirs package. On recent Windows versions, this will usually be in the location ⁠C:\\Users\\(username)\\AppData\\Local\\AzureR⁠. On Unix/Linux, it will be in ⁠~/.local/share/AzureR⁠, and on MacOS, it will be in ⁠~/Library/Application Support/AzureR⁠.Alternatively, you can specify the location of the directory in the environment variable R_AZURE_DATA_DIR. AzureAuth does not modify R's working directory, which significantly lessens the risk of accidentally introducing cached tokens into source control.

On package startup, if this directory does not exist, AzureAuth will prompt you for permission to create it. It's recommended that you allow the directory to be created, as otherwise you will have to reauthenticate with Azure every time. Note that many cloud engineering tools, including the Azure CLI, save authentication credentials in this way. The prompt only appears in an interactive session (in the sense that interactive() returns TRUE); if AzureAuth is loaded in a batch script, the directory is not created if it doesn't already exist.

create_AzureR_dir is a utility function to create the caching directory manually. This can be useful not just for non-interactive sessions, but also Jupyter and R notebooks, which are not technically interactive in that interactive() returns FALSE.

The caching directory is also used by other AzureR packages, notably AzureRMR (for storing Resource Manager logins) and AzureGraph (for Microsoft Graph logins). You should not save your own files in it; instead, treat it as something internal to the AzureR packages.

Value

A string containing the data directory.

See Also

get_azure_token

rappdirs::user_data_dir


[Package AzureAuth version 1.3.3 Index]