# dazapiz > The Azure helpers azure-identity lacks: your az login carried into Spark, DuckDB and any Azure REST API. ## Docs ### API Reference #### Refresh tokens and credentials > Find the `az login` refresh token, or sign in for one, and redeem it. - [refresh_token_from_az_cli](https://pedrobtz.github.io/py-dazapiz/reference/refresh_token_from_az_cli.html): The refresh token of the account the Azure CLI is signed in as - [RefreshTokenInfo](https://pedrobtz.github.io/py-dazapiz/reference/RefreshTokenInfo.html): A refresh token with the client ID and tenant it belongs to - [SupportsRefreshToken](https://pedrobtz.github.io/py-dazapiz/reference/SupportsRefreshToken.html): Anything that can hand over a refresh token with its client ID and tenant - [AZURE_CLI_CLIENT_ID](https://pedrobtz.github.io/py-dazapiz/reference/AZURE_CLI_CLIENT_ID.html): str(object='') -> str - [RefreshTokenCredential](https://pedrobtz.github.io/py-dazapiz/reference/RefreshTokenCredential.html): A `TokenCredential` that redeems a refresh token for access tokens - [DeviceCodeCredential](https://pedrobtz.github.io/py-dazapiz/reference/DeviceCodeCredential.html): `azure.identity.DeviceCodeCredential` with a persisted cache and `get_refresh_token()` - [InteractiveBrowserCredential](https://pedrobtz.github.io/py-dazapiz/reference/InteractiveBrowserCredential.html): `azure.identity.InteractiveBrowserCredential` with a persisted cache and `get_refresh_token()` #### Spark > Hadoop ABFS configuration for PySpark. - [spark_storage_conf](https://pedrobtz.github.io/py-dazapiz/reference/spark_storage_conf.html): Build the Hadoop `fs.azure.*` keys that let Spark read ADLS Gen2 - [SparkStorageConf](https://pedrobtz.github.io/py-dazapiz/reference/SparkStorageConf.html): The `fs.azure.*` keys of `spark_storage_conf()`, as a plain `dict[str, str]` #### REST client > A small httpx client for one Azure-protected REST API, and its credentials. - [ApiClient](https://pedrobtz.github.io/py-dazapiz/reference/ApiClient.html): A client for one REST API, meant to be subclassed once per API - [app_credential](https://pedrobtz.github.io/py-dazapiz/reference/app_credential.html): The credential an API's client uses, chosen from the environment now #### az CLI > Log the Azure CLI in and out, and read its current account. - [az_login](https://pedrobtz.github.io/py-dazapiz/reference/az_login.html): Log the Azure CLI in with a device code, unless it already is - [az_logout](https://pedrobtz.github.io/py-dazapiz/reference/az_logout.html): Log the Azure CLI out, by `az logout` - [az_is_login](https://pedrobtz.github.io/py-dazapiz/reference/az_is_login.html): Whether the Azure CLI is logged in, by `az account show` - [az_account_show](https://pedrobtz.github.io/py-dazapiz/reference/az_account_show.html): The Azure CLI's current account, from `az account show --output json` #### DuckDB > Azure secrets and settings for DuckDB, in `dazapiz.duckdb` (needs `dazapiz[duckdb]`). - [duckdb.set_credential_secret](https://pedrobtz.github.io/py-dazapiz/reference/duckdb.set_credential_secret.html) - [duckdb.set_token_secret](https://pedrobtz.github.io/py-dazapiz/reference/duckdb.set_token_secret.html) - [duckdb.set_sp_secret](https://pedrobtz.github.io/py-dazapiz/reference/duckdb.set_sp_secret.html) - [duckdb.set_chain_secret](https://pedrobtz.github.io/py-dazapiz/reference/duckdb.set_chain_secret.html) - [duckdb.list_secrets](https://pedrobtz.github.io/py-dazapiz/reference/duckdb.list_secrets.html) - [duckdb.azure_settings](https://pedrobtz.github.io/py-dazapiz/reference/duckdb.azure_settings.html) - [duckdb.tune](https://pedrobtz.github.io/py-dazapiz/reference/duckdb.tune.html) - [duckdb.STORAGE_SCOPE](https://pedrobtz.github.io/py-dazapiz/reference/duckdb.STORAGE_SCOPE.html) #### Testing > Test doubles for code built on dazapiz, in `dazapiz.testing`. - [testing.StaticTokenCredential](https://pedrobtz.github.io/py-dazapiz/reference/testing.StaticTokenCredential.html) #### Errors > Everything dazapiz raises derives from `DazapizError`. - [DazapizError](https://pedrobtz.github.io/py-dazapiz/reference/DazapizError.html): Base class of every error dazapiz raises - [RefreshTokenNotFoundError](https://pedrobtz.github.io/py-dazapiz/reference/RefreshTokenNotFoundError.html): No refresh token was found where one was looked for - [UnsupportedPlatformError](https://pedrobtz.github.io/py-dazapiz/reference/UnsupportedPlatformError.html): The operation is not available on this operating system - [AzCliError](https://pedrobtz.github.io/py-dazapiz/reference/AzCliError.html): An `az` command failed; the message carries what `az` wrote to stderr - [AzCliNotFoundError](https://pedrobtz.github.io/py-dazapiz/reference/AzCliNotFoundError.html): No `az` on PATH - [AzCliNotLoggedInError](https://pedrobtz.github.io/py-dazapiz/reference/AzCliNotLoggedInError.html): The Azure CLI is not logged in - [AzCliNonInteractiveError](https://pedrobtz.github.io/py-dazapiz/reference/AzCliNonInteractiveError.html): `az_login()` was called where nobody can answer the device-code prompt - [AzCliTimeoutError](https://pedrobtz.github.io/py-dazapiz/reference/AzCliTimeoutError.html): An `az` command did not finish within its timeout and was killed - [ApiError](https://pedrobtz.github.io/py-dazapiz/reference/ApiError.html): An `ApiClient` request ended in a non-2xx response, after any retries - [ResponseParseError](https://pedrobtz.github.io/py-dazapiz/reference/ResponseParseError.html): A successful response's body could not be parsed or was rejected by `parse=`