Skip to content

azure.identity.credentials raises DeprecationWarnings in Microsoft MSAL code #36713

@akx

Description

@akx
  • Package Name: azure-identity
  • Package Version: 1.17.1
  • Operating System: Linux
  • Python Version: 3.8

Describe the bug

tokens = self._cache.find(TokenCache.CredentialType.ACCESS_TOKEN, target=[resource])
uses TokenCache.find.

TokenCache.find started raising a DeprecationWarning in MSAL 1.29.0+ (AzureAD/microsoft-authentication-library-for-python#693):

https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/3279f045dc573d8408ddcdf3565e8b16247627be/msal/token_cache.py#L162-L167

When calling any code that ends up using the managed identity client, a DeprecationWarning is raised. In environments where warning filters are configured to raise exceptions, this is a problem.

To Reproduce

Steps to reproduce the behavior:

  1. Install azure-identity==1.17.1 msal>=1.29.0.
  2. Invoke the managed identity client with e.g. blob_client.download_blob() with suitable credentials.

Expected behavior

No deprecation warning from Microsoft libraries using deprecated features from other Microsoft libraries.

--

cc @rayluo for having landed this in MSAL.

Metadata

Metadata

Assignees

Labels

Azure.IdentityClientThis issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions