az_logout()
Log the Azure CLI out, by az logout.
Usage
az_logout(timeout=_TIMEOUT)Parameters
timeout: float | None = _TIMEOUT-
Seconds to wait for
az;Nonewaits as long as it takes.
Raises
AzCliNotLoggedInError-
No account is logged in.
AzCliNotFoundError-
There is no
azon PATH. AzCliTimeoutError-
azdid not finish withintimeoutseconds. AzCliError- Any other failure.
Notes
Runs az logout (ported from azr’s az_cli_*() helpers), which removes the signed-in account and its tokens from the CLI’s cache.
Examples
from dazapiz import az_logout
az_logout() # Logged out of the Azure CLI.