az_cli_is_login: Check if User is Logged in to Azure CLI

View source: R/credential-azure-cli.R

az_cli_is_loginR Documentation

Check if User is Logged in to Azure CLI

Description

Checks whether the user is currently logged in to Azure CLI by attempting to retrieve account information.

Usage

az_cli_is_login(timeout = 10L)

Arguments

timeout

A numeric value specifying the timeout in seconds for the Azure CLI command. Defaults to 10.

Value

A logical value: TRUE if the user is logged in, FALSE otherwise

Examples

## Not run: 
# Check if logged in
if (az_cli_is_login()) {
  message("User is logged in")
} else {
  message("User is not logged in")
}

## End(Not run)


azr documentation built on Feb. 18, 2026, 1:07 a.m.