Performs an interactive Azure CLI login using device code flow. Automatically captures the device code, copies it to the clipboard, and opens the browser for authentication.
az_cli_login(tenant_id = NULL, use_bridge = FALSE, verbose = FALSE)Invisibly returns the exit status (0 for success, non-zero for failure)
A character string specifying the Azure Active Directory
tenant ID to authenticate against. If NULL (default), uses the default
tenant from Azure CLI configuration.
A logical value indicating whether to use the device code
bridge webpage. If TRUE, launches an intermediate local webpage that
displays the device code and facilitates copy-pasting before redirecting
to the Microsoft device login page. If FALSE (default), copies the code
directly to the clipboard and opens the Microsoft login page.
A logical value indicating whether to print detailed process
output to the console, including error messages from the Azure CLI process.
If FALSE (default), only essential messages are displayed.
This function runs az login --use-device-code, monitors the output
to extract the device code, copies it to the clipboard, and opens
the authentication URL in the default browser.