Azure Common
raw JSON → 1.1.28 verified Tue May 12 auth: no python install: stale quickstart: stale deprecated
The `azure-common` library served as a foundational package providing shared code, common exceptions, and configuration mechanisms across various older Azure SDK for Python libraries. While its latest release is 1.1.28 (February 2022), much of its functionality has been superseded by `azure-core` and `azure-identity` in the newer generation of Azure SDKs. It generally had a slow release cadence due to its foundational nature.
pip install azure-common Common errors
error ModuleNotFoundError: No module named 'azure.common' ↓
cause The 'azure-common' package is not installed in the Python environment.
fix
Install the package using pip: 'pip install azure-common'.
error ImportError: cannot import name 'HTTPFailure' from 'azure.cosmos.errors' ↓
cause The 'HTTPFailure' class has been removed or relocated in newer versions of the 'azure-cosmos' package.
fix
Update the import statement to use the appropriate exception class from the current version of 'azure-cosmos'.
error ImportError: cannot import name 'BlobServiceClient' from 'azure.storage.blob' ↓
cause The 'BlobServiceClient' class is not available in the installed version of the 'azure-storage-blob' package.
fix
Ensure that the latest version of 'azure-storage-blob' is installed using pip: 'pip install --upgrade azure-storage-blob'.
error ModuleNotFoundError: No module named 'azure.storage.common' ↓
cause The 'azure-storage-common' package is not installed or has been deprecated.
fix
Install the 'azure-storage-common' package using pip: 'pip install azure-storage-common', or update the code to use the latest Azure SDKs.
error ImportError: cannot import name 'ServicePrincipalCredentials' from 'azure.common.credentials' ↓
cause The 'ServicePrincipalCredentials' class has been moved or deprecated in newer versions of the Azure SDK.
fix
Use 'DefaultAzureCredential' from the 'azure-identity' package as a replacement.
Warnings
breaking The `azure-common` library is officially deprecated, and its support ended on March 31, 2023. It is strongly recommended to migrate to the newer Azure SDK client libraries which utilize `azure-core` and `azure-identity` for common functionalities, as older libraries will no longer receive official support and updates from Microsoft. ↓
fix Transition to modern Azure SDK packages. For common exceptions, use `azure.core.exceptions`. For authentication, use `azure-identity`. Consult Azure SDK migration guides for specific service clients.
gotcha `azure-common` has implicit, undeclared dependencies on `msrest`, `msrestazure`, and `adal` for certain (now mostly deprecated) functionalities, such as `azure.common.client_factory`. Without these packages explicitly installed, attempting to use such features will result in `ImportError`s. Both `msrestazure` and `adal` are themselves deprecated. ↓
fix Avoid using functionalities that rely on these implicit dependencies. If absolutely necessary for legacy code, explicitly install `pip install msrest msrestazure adal` (but be aware these packages are also deprecated).
deprecated Specific methods within `azure-common`, such as `azure.common.cloud.get_cli_active_cloud` and `azure.common.credentials.get_azure_cli_credentials`, are deprecated (explicitly in version 1.1.28) and are incompatible with `azure-cli-core` versions 2.21.0 and higher due to API changes in the CLI. ↓
fix For credential management, use `AzureCliCredential` from the `azure-identity` library (e.g., `from azure.identity import AzureCliCredential`).
Install compatibility stale last tested: 2026-05-12
python os / libc status wheel install import disk
3.10 alpine (musl) wheel - - 17.9M
3.10 alpine (musl) - - - -
3.10 slim (glibc) wheel 1.5s - 18M
3.10 slim (glibc) - - - -
3.11 alpine (musl) wheel - - 19.7M
3.11 alpine (musl) - - - -
3.11 slim (glibc) wheel 1.5s - 20M
3.11 slim (glibc) - - - -
3.12 alpine (musl) wheel - - 11.6M
3.12 alpine (musl) - - - -
3.12 slim (glibc) wheel 1.4s - 12M
3.12 slim (glibc) - - - -
3.13 alpine (musl) wheel - - 11.3M
3.13 alpine (musl) - - - -
3.13 slim (glibc) wheel 1.4s - 12M
3.13 slim (glibc) - - - -
3.9 alpine (musl) wheel - - 17.4M
3.9 alpine (musl) - - - -
3.9 slim (glibc) wheel 1.7s - 18M
3.9 slim (glibc) - - - -
Imports
- AzureMissingResourceOrPropertyError
from azure.common import AzureMissingResourceOrPropertyError - get_azure_cli_credentials wrong
from azure.identity import AzureCliCredentialcorrectfrom azure.common.credentials import get_azure_cli_credentials
Quickstart stale last tested: 2026-04-24
from azure.common import AzureMissingResourceOrPropertyError
try:
raise AzureMissingResourceOrPropertyError('Resource not found in legacy system.')
except AzureMissingResourceOrPropertyError as e:
print(f"Caught expected legacy error: {e}")
# For new code, consider using azure-core exceptions, e.g.:
# from azure.core.exceptions import ResourceNotFoundError
# try:
# raise ResourceNotFoundError('Resource not found in modern system.')
# except ResourceNotFoundError as e:
# print(f"Caught modern error: {e}")