{"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":"en","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,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}