powered by
Checks whether the user is currently logged in to Azure CLI by attempting to retrieve account information.
az_cli_is_login(timeout = 10L)
A logical value: TRUE if the user is logged in, FALSE otherwise
TRUE
FALSE
A numeric value specifying the timeout in seconds for the Azure CLI command. Defaults to 10.
10
if (FALSE) { # Check if logged in if (az_cli_is_login()) { message("User is logged in") } else { message("User is not logged in") } }
Run the code above in your browser using DataLab