{"id":612,"library":"azure-common","title":"Azure Common","description":"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.","status":"deprecated","version":"1.1.28","language":"python","source_language":"en","source_url":"https://github.com/Azure/azure-sdk-for-python","tags":["azure","sdk","common","utility","deprecated"],"install":[{"cmd":"pip install azure-common","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Implicitly required for some older functionalities like client_factory. Not explicitly declared as a dependency in azure-common's setup.py. Avoid if possible.","package":"msrest","optional":true},{"reason":"Implicitly required for some older functionalities like client_factory. It is also deprecated and not explicitly declared as a dependency in azure-common's setup.py. Avoid if possible.","package":"msrestazure","optional":true},{"reason":"Implicitly required for some older credential functionalities. It is also deprecated and not explicitly declared as a dependency in azure-common's setup.py. Avoid if possible.","package":"adal","optional":true}],"imports":[{"note":"An example of a common exception. For new development, exceptions from `azure-core` should be preferred (e.g., `azure.core.exceptions.ResourceNotFoundError`).","symbol":"AzureMissingResourceOrPropertyError","correct":"from azure.common import AzureMissingResourceOrPropertyError"},{"note":"This method is deprecated and does not work with modern Azure CLI versions (>=2.21.0). Use `azure-identity.AzureCliCredential` instead for authentication.","wrong":"from azure.identity import AzureCliCredential","symbol":"get_azure_cli_credentials","correct":"from azure.common.credentials import get_azure_cli_credentials"}],"quickstart":{"code":"from azure.common import AzureMissingResourceOrPropertyError\n\ntry:\n    raise AzureMissingResourceOrPropertyError('Resource not found in legacy system.')\nexcept AzureMissingResourceOrPropertyError as e:\n    print(f\"Caught expected legacy error: {e}\")\n\n# For new code, consider using azure-core exceptions, e.g.:\n# from azure.core.exceptions import ResourceNotFoundError\n# try:\n#     raise ResourceNotFoundError('Resource not found in modern system.')\n# except ResourceNotFoundError as e:\n#     print(f\"Caught modern error: {e}\")","lang":"python","description":"A minimal demonstration of importing and using an exception from `azure-common`. Given its deprecated status, this library is generally not recommended for new development."},"warnings":[{"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.","message":"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.","severity":"breaking","affected_versions":"<=1.1.28"},{"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).","message":"`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.","severity":"gotcha","affected_versions":"<=1.1.28"},{"fix":"For credential management, use `AzureCliCredential` from the `azure-identity` library (e.g., `from azure.identity import AzureCliCredential`).","message":"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.","severity":"deprecated","affected_versions":">=1.1.28"}],"env_vars":null,"last_verified":"2026-05-12T16:41:47.265Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"fix":"Install the package using pip: 'pip install azure-common'.","cause":"The 'azure-common' package is not installed in the Python environment.","error":"ModuleNotFoundError: No module named 'azure.common'"},{"fix":"Update the import statement to use the appropriate exception class from the current version of 'azure-cosmos'.","cause":"The 'HTTPFailure' class has been removed or relocated in newer versions of the 'azure-cosmos' package.","error":"ImportError: cannot import name 'HTTPFailure' from 'azure.cosmos.errors'"},{"fix":"Ensure that the latest version of 'azure-storage-blob' is installed using pip: 'pip install --upgrade azure-storage-blob'.","cause":"The 'BlobServiceClient' class is not available in the installed version of the 'azure-storage-blob' package.","error":"ImportError: cannot import name 'BlobServiceClient' from 'azure.storage.blob'"},{"fix":"Install the 'azure-storage-common' package using pip: 'pip install azure-storage-common', or update the code to use the latest Azure SDKs.","cause":"The 'azure-storage-common' package is not installed or has been deprecated.","error":"ModuleNotFoundError: No module named 'azure.storage.common'"},{"fix":"Use 'DefaultAzureCredential' from the 'azure-identity' package as a replacement.","cause":"The 'ServicePrincipalCredentials' class has been moved or deprecated in newer versions of the Azure SDK.","error":"ImportError: cannot import name 'ServicePrincipalCredentials' from 'azure.common.credentials'"}],"ecosystem":"pypi","meta_description":null,"install_score":0,"install_tag":"stale","quickstart_score":0,"quickstart_tag":"stale","pypi_latest":"1.1.28","install_checks":{"last_tested":"2026-05-12","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"17.9M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"18M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"19.7M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"20M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.6M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.4,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.3M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.4,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"17.4M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.7,"import_time_s":null,"mem_mb":null,"disk_size":"18M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]},"quickstart_checks":{"last_tested":"2026-04-24","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}}