The `azure-mgmt-core` library provides extensions to Azure Core that are specific to Azure Resource Management (ARM), primarily used by Azure SDK management client libraries (e.g., `azure-mgmt-resource`). As a foundational component, it handles common ARM-specific patterns such as long-running operations and authentication challenges. The current stable version is 1.6.0, and it follows the release cadence of the broader Azure SDK for Python.
Install & Compatibility
Where this runs
tested against v1.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ARMPipelineClient
✓ from azure.mgmt.core import ARMPipelineClient
✗ from azure.mgmt.core.pipeline_client import ARMPipelineClient
This library is primarily an internal dependency for Azure management SDKs. As such, direct 'quickstarts' for `azure-mgmt-core` are uncommon. Instead, its functionality is consumed by service-specific management clients (e.g., `ResourceManagementClient`). This example demonstrates how to initialize and use a typical Azure management client, which implicitly leverages `azure-mgmt-core` for its core ARM functionalities like authentication and request handling. Ensure `AZURE_SUBSCRIPTION_ID` is set as an environment variable or replaced.
import os
from azure.identity import DefaultAzureCredential
from azure.mgmt.resource import ResourceManagementClient
# NOTE: azure-mgmt-core is an internal dependency for Azure management SDKs.
# This quickstart demonstrates how a typical Azure management client is used,
# which indirectly relies on azure-mgmt-core.
# Your Azure subscription ID
# It's recommended to set this as an environment variable (AZURE_SUBSCRIPTION_ID)
# or retrieve it from your Azure context.
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "your-subscription-id")
if subscription_id == "your-subscription-id":
print("Please set the AZURE_SUBSCRIPTION_ID environment variable or replace 'your-subscription-id'.")
exit()
# Authenticate with Azure using DefaultAzureCredential.
# This attempts to authenticate via various methods like environment variables, Azure CLI, managed identity, etc.
credential = DefaultAzureCredential()
# Create a ResourceManagementClient (which uses azure-mgmt-core internally)
resource_client = ResourceManagementClient(credential, subscription_id)
# Example: List all resource groups in the subscription
print(f"Listing resource groups in subscription: {subscription_id}")
for rg in resource_client.resource_groups.list():
print(f"- {rg.name} (Location: {rg.location})")
print("\nQuickstart finished. This demonstrates how an Azure management client (which relies on azure-mgmt-core) is typically used.")
Debug
Known issues
gotchaDirect installation of `azure-mgmt-core` is generally not needed for end-users. It is an internal dependency automatically installed when you install other service-specific Azure management SDKs (e.g., `azure-mgmt-compute`, `azure-mgmt-resource`).fixInstall the specific `azure-mgmt-<service>` package you need; `azure-mgmt-core` will be installed as a dependency.
affects: All versions
breakingPython 3.8 is no longer supported starting with `azure-mgmt-core` version 1.6.0. Earlier versions of the Azure SDK for Python might have supported it, but the current generation of management libraries requires Python 3.9 or later.fixUpgrade your Python environment to version 3.9 or later. The `requires_python` metadata is `^=3.9`.
affects: >=1.6.0
breakingThe credential system for Azure SDKs has been completely revamped. Older management libraries used `azure.common.credentials` or `msrestazure.azure_active_directory`. All modern Azure management libraries, which `azure-mgmt-core` underpins, now use classes from the `azure-identity` package.fixInstall the `azure-identity` package (`pip install azure-identity`) and then migrate your authentication code to use classes from it, such as `DefaultAzureCredential`. The `credential` parameter has also been renamed from `credentials` in many client constructors.
affects: Migrations from SDKs released before ~2020
gotchaAsynchronous long-running operations in the newer Azure SDKs, which are handled through `azure-mgmt-core`, now typically use methods prefixed with `begin_` (e.g., `begin_create`, `begin_delete`). These methods return an `azure.core.polling.LROPoller` object.fixWhen performing long-running operations, call the `begin_` prefixed method and then await or poll the returned `LROPoller` object for the final result.
affects: SDKs adopting the new guidelines (generally 2020 onwards)
Audit
Dependencies
azure-corerequiredProvides core HTTP pipeline, serialization, and other primitives. `azure-mgmt-core` extends it for ARM-specific functionality.
azure-identityrequiredRequired for modern token-based authentication with Azure management clients, which implicitly use `azure-mgmt-core` for handling credentials.