{"id":3903,"library":"azure-servicemanagement-legacy","title":"Azure Legacy Service Management Client Library","description":"This library provides programmatic access to the older Azure Service Management (ASM) APIs for Python. It is now deprecated and has been superseded by the Azure Resource Manager (ARM) APIs, which offer a more robust and feature-rich way to manage Azure resources. The last version is 0.20.8, released on Oct 31, 2024, and it will only receive security fixes until this date, with no further maintenance or new features.","status":"deprecated","version":"0.20.8","language":"python","source_language":"en","source_url":"https://github.com/Azure/azure-sdk-for-python","tags":["azure","cloud","legacy","service management","deprecated"],"install":[{"cmd":"pip install azure-servicemanagement-legacy","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"note":"This library uses the old Azure Service Management (ASM) API patterns. Newer Azure SDKs use 'azure.mgmt.<service>' for service clients and 'azure-identity' for authentication.","wrong":"from azure.mgmt.<service> import <Client>","symbol":"ServiceManagementService","correct":"from azure.servicemanagement import ServiceManagementService"}],"quickstart":{"code":"from azure.servicemanagement import ServiceManagementService\nimport os\n\n# WARNING: This library is DEPRECATED and not recommended for new projects.\n# It uses the old Azure Service Management (ASM) APIs, which have been retired\n# and no longer receive feature updates or non-security bug fixes after Oct 31, 2024.\n# New development should use the modern Azure Resource Manager (ARM) SDKs\n# (e.g., azure-mgmt-compute, azure-mgmt-network, azure-mgmt-storage) and 'azure-identity' for authentication.\n# This example is purely illustrative and not recommended for active use.\n\ntry:\n    subscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', 'YOUR_SUBSCRIPTION_ID')\n    # Connecting to ASM typically requires a management certificate (.pem file).\n    # For a quickstart, providing a runnable example with certificates is cumbersome and misleading\n    # given the library's deprecated status. The primary intent is to show the import\n    # and strongly advise against its use.\n    # For historical context, an instantiation might look like:\n    # cert_file_path = os.environ.get('AZURE_MANAGEMENT_CERT_PATH', '/path/to/your/management_cert.pem')\n    # service_client = ServiceManagementService(subscription_id, cert_file_path)\n\n    print(\"The 'azure-servicemanagement-legacy' library is deprecated.\")\n    print(\"Migrate to Azure Resource Manager (ARM) SDKs and 'azure-identity' for modern Azure management.\")\nexcept Exception as e:\n    print(f\"An error occurred (likely due to deprecated usage or missing credentials/certs): {e}\")\n    print(\"This is expected behavior for a deprecated library without proper legacy setup.\")","lang":"python","description":"This quickstart demonstrates how to import the `ServiceManagementService` client. It explicitly warns against using this deprecated library for new development and highlights the need to migrate to modern Azure Resource Manager (ARM) SDKs and `azure-identity` for authentication. A fully runnable example for this legacy library is intentionally omitted due to its deprecated status and complex, older authentication mechanism (management certificates)."},"warnings":[{"fix":"Migrate all existing usage to the modern Azure Resource Manager (ARM) SDKs. Identify the specific Azure service you need to manage (e.g., Compute, Network, Storage) and use its corresponding `azure-mgmt-*` library. Adopt `azure-identity` for secure and modern authentication.","message":"This library uses the Azure Service Management (ASM) APIs, which have been formally deprecated and replaced by Azure Resource Manager (ARM) APIs. Microsoft ceased maintenance and new feature development for this package after October 31, 2024, providing only security fixes until that date.","severity":"breaking","affected_versions":"0.20.8 and earlier (all versions)"},{"fix":"When migrating to ARM SDKs, switch to `azure-identity` for robust, token-based authentication, which supports various credential types like service principals, managed identities, and developer credentials.","message":"Authentication for ASM APIs typically relies on X.509 management certificates, which is an older, less secure, and more cumbersome authentication method compared to the credential classes provided by the `azure-identity` library for modern ARM SDKs.","severity":"gotcha","affected_versions":"0.20.8 and earlier (all versions)"},{"fix":"As stated, transition to the new Azure SDK libraries for continued support, security updates, and access to new features.","message":"The entire 'azure-servicemanagement-legacy' package is classified as '7 - Inactive' development status on PyPI and is officially deprecated by Microsoft. It is not suitable for new projects and actively discouraged for existing ones.","severity":"deprecated","affected_versions":"0.20.8 and earlier (all versions)"}],"env_vars":null,"search_vec":"'0.20.8':55 '2024':60 '31':59 'access':11 'api':19,36 'arm':35 'asm':18 'azur':1,15,32,49,78 'client':5 'cloud':79 'date':70 'deprec':25,83 'featur':44,77 'feature-rich':43 'fix':67 'last':52 'legaci':2,80 'librari':6,8 'mainten':74 'manag':4,17,34,48,82 'new':76 'oct':58 'offer':38 'older':14 'programmat':10 'provid':9 'python':21 'receiv':65 'releas':56 'resourc':33,50 'rich':45 'robust':41 'secur':66 'servic':3,16,81 'supersed':29 'version':53 'way':46","created_at":"2026-04-12T03:32:34.942073+00:00","updated_at":"2026-04-15T23:25:03.475889+00:00","problems":[{"fix":"Install the package using pip: `pip install azure-servicemanagement-legacy`. However, it is strongly recommended to migrate to the newer Azure SDK for Python (Azure Resource Manager) as the legacy library is deprecated and no longer actively maintained for new features.","cause":"The `azure-servicemanagement-legacy` package is not installed in the current Python environment, or the environment is not correctly configured to find it. This error also commonly occurs when attempting to use a deprecated library without proper installation.","error":"ModuleNotFoundError: No module named 'azure-servicemanagement-legacy'"},{"fix":"Install the specific modern Azure Storage SDK package, such as `pip install azure-storage-blob`, and update import statements to reflect the modular structure, e.g., `from azure.storage.blob import BlobServiceClient`.","cause":"This error typically arises when code attempts to import modules from the old `azure.storage` namespace, which was part of a monolithic `azure` package or an older `azure-storage` library. The modern Azure SDK for Python uses modular packages, meaning storage components are in `azure-storage-blob`, `azure-storage-queue`, etc.","error":"ImportError: No module named 'azure.storage'"},{"fix":"Update your code to use the current client classes from the `azure.storage.blob` module, such as `BlobServiceClient` for managing all blob resources in a storage account, or `ContainerClient` and `BlobClient` for specific container and blob operations. For example: `from azure.storage.blob import BlobServiceClient`.","cause":"The class names like `BlobService` or `BlockBlobService` were used in older versions of the Azure Storage SDK (pre-v12). In the modern `azure-storage-blob` library, these client classes have been renamed and refactored (e.g., to `BlobServiceClient`, `ContainerClient`, `BlobClient`).","error":"ImportError: cannot import name 'BlobService' from 'azure.storage.blob'"},{"fix":"This is a warning from the library itself and generally does not halt execution. The recommended action is to migrate away from `azure-servicemanagement-legacy` to the modern Azure SDK for Python (Azure Resource Manager), as the legacy library will not receive updates for such compatibility issues.","cause":"This warning indicates that string literals within the `azure-servicemanagement-legacy` library use escape sequences (like `\\m`) that are considered invalid or are interpreted differently in newer Python versions (e.g., Python 3.6+), which enforce stricter rules for backslash sequences in string literals.","error":"DeprecationWarning: invalid escape sequence \\m"},{"fix":"Thoroughly check the parameters and credentials used in your `azure-servicemanagement-legacy` API calls. Ensure that authentication is successful and that the requested resources exist and are accessible. It's good practice to check if the returned object is `None` before attempting to access its attributes. Ultimately, migrating to the Azure Resource Manager SDK is recommended for more robust and actively supported APIs.","cause":"This error typically occurs when an API call made using `azure-servicemanagement-legacy` returns `None` instead of an expected object (e.g., a client instance or a resource object). This can happen due to various reasons, including authentication failures, invalid parameters, or the requested resource not being found. When subsequent code tries to access an attribute on this `None` object, the `AttributeError` is raised.","error":"AttributeError: 'NoneType' object has no attribute '...'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.20.8","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/Azure/azure-sdk-for-python","docs":null,"changelog":null,"pypi":"https://pypi.org/project/azure-servicemanagement-legacy/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["azure","type-stubs"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-29","next_check":"2026-07-28","install_tag":null}}