Registry /
azure / azure-mgmt-resource-subscriptions
Install & Compatibility
Where this runs
tested against v1.0.0b2 · 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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.577s · 43MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 3.7s · import 0.526s · 43MB
42MB installed
● package 42MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SubscriptionClient
✓ from azure.mgmt.resource.subscriptions import SubscriptionClient
✗ from azure.mgmt.resource import SubscriptionClient
The SubscriptionClient was moved to its own package from `azure-mgmt-resource` in newer Azure SDK versions.
DefaultAzureCredential
✓ from azure.identity import DefaultAzureCredential
This quickstart demonstrates how to authenticate using `DefaultAzureCredential` and list all accessible Azure subscriptions. Ensure the necessary environment variables (`AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`) are configured for `DefaultAzureCredential` to function, or use other authentication methods provided by `azure-identity`.
import os
from azure.identity import DefaultAzureCredential
from azure.mgmt.resource.subscriptions import SubscriptionClient
# Ensure environment variables are set for authentication:
# AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
# (or other methods supported by DefaultAzureCredential)
credential = DefaultAzureCredential()
client = SubscriptionClient(credential=credential)
print("Listing Azure subscriptions:")
for subscription in client.subscriptions.list():
print(f" Name: {subscription.display_name} (ID: {subscription.subscription_id})")
Debug
Known issues
breakingThis library is currently in a beta (preview) state (e.g., 1.0.0b1). Beta libraries are not recommended for production use as they may contain bugs or undergo non-backward compatible API changes without prior notice.fixFor production workloads, prefer stable (GA) versions of Azure SDK libraries. If a stable version of this specific functionality is not yet available, use beta versions with caution and be prepared for potential breaking changes upon upgrade. Monitor Azure SDK release notes for GA announcements.
affects: 1.0.0b1 and other beta releases
breakingThe `SubscriptionClient` and related subscription management functionalities were separated from the monolithic `azure-mgmt-resource` package into `azure-mgmt-resource-subscriptions`. Direct imports like `from azure.mgmt.resource import SubscriptionClient` will fail in newer SDK versions.fixUpdate import statements to `from azure.mgmt.resource.subscriptions import SubscriptionClient` and ensure `azure-mgmt-resource-subscriptions` is installed.
affects: Migrations from older `azure-mgmt-resource` versions to newer SDKs
gotchaWhen constructing a `SubscriptionClient`, an `api_version` parameter is available (defaulting to '2022-12-01'). Explicitly overriding this default to an unsupported or incorrect API version can lead to unexpected behavior or errors.fixUnless specific requirements dictate otherwise, rely on the default `api_version` provided by the SDK or consult official documentation to determine compatible API versions for specific operations.
affects: All versions
gotchaThe package requires Python 3.9+. Using it with older Python versions will result in installation or runtime errors.fixEnsure your development and deployment environments are running Python 3.9 or a newer compatible version.
affects: Python < 3.9
Upgrade
Version history
1.0.0b2latest on PyPI · released May 22, 2026
Audit
Dependencies
azure-identityrequiredRequired for Azure Active Directory token authentication.
PythonrequiredRequires Python 3.9 or higher.