Registry / azure / azure-mgmt-resource-subscriptions

azure-mgmt-resource-subscriptions

JSON →
library1.0.0b2pypypiunverified

The `azure-mgmt-resource-subscriptions` library is the Microsoft Azure Resource Subscriptions Management Client Library for Python. It provides functionality to manage Azure subscriptions programmatically. As of the current release, 1.0.0b1, it is in a beta stage, indicating active development with potential for non-backward compatible changes. It is part of the broader Azure SDK for Python ecosystem, which typically follows a frequent release cadence for both stable and preview packages.

pip install azure-mgmt-resource-subscriptions azure-identity
INSTALL
IMPORT
SIG · AZURE-MGMT-RESOURC
A
azure-mgmt-resource-subscriptions
azurepythonv1.0.0b2
Install
3.7s avg
Import
552ms
Disk
42MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.577s · 43MB
glibc
py 3.103.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.
fix
For 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.
fix
Update 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.
fix
Unless 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.
fix
Ensure 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.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
azure-mgmt-resource-subscriptions — pip install azure-mgmt-resource-subscriptions · libregistry