msrestazure provides Azure-specific functionality for the AutoRest-generated Python client runtime (`msrest`). It extends `msrest` with features like Azure Long-Running Operations (LRO) polling, Azure-specific authentication credentials, and error handling for Azure services. It is a foundational component for older versions of the Azure SDK for Python, with the current version being 0.6.4.post1. Its release cadence has been infrequent since 2020.
pip install msrestazureVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the use of `msrestazure.tools` for parsing and validating Azure resource IDs, a common utility provided by the library. While `msrestazure` is primarily a low-level runtime for AutoRest-generated clients, these utility functions are directly usable.
Review your code for direct access or usage of 'auth_uri', 'state', or 'client' on these credential objects and remove them. These were primarily internal attributes.
When upgrading to msrestazure 0.6.0 or higher, also review the breaking changes for the corresponding msrest 0.6.x version, as your code might be affected indirectly by changes in the underlying runtime.
For new projects, prefer using the latest 'azure-mgmt-*' and 'azure-identity' packages which are built on 'azure-core'. Consult the official Azure SDK for Python documentation for the most up-to-date guidance.
Applications relying on extracting the 'provider' from resource IDs using `msrestazure` should verify the output. If the parsing is incorrect, consider implementing custom parsing logic or migrating to the newer `azure-core` based SDKs (e.g., `azure-mgmt-resource`) which offer more robust and accurate resource ID parsing capabilities.
Install the package using pip: `pip install msrestazure`
Ensure `msrestazure` is explicitly installed: `pip install msrestazure`
Migrate your authentication code to use credential classes from the `azure-identity` library (e.g., `ClientSecretCredential`, `DefaultAzureCredential`) and ensure your client is compatible with `azure-identity`.
For newer `azure-identity` credentials, you may need to use `msrestazure.azure_active_directory.AzureIdentityCredentialWrapper` to adapt the `azure-identity` credential for older `msrestazure`-based clients, or preferably, migrate to newer versions of the Azure SDK clients that natively support `azure-identity` credentials.