class_docstr: Adapt azure-identity credentials for backward compatibility.
  
  Adapt credentials from azure-identity to be compatible with SD
  that needs msrestazure or azure.common.credentials
  
  Check https://stackoverflow.com/questions/63384092/exception-attributeerror-defaultazurecredential-object-has-no-attribute-sig
class_docstr_tok: ["Adapt","azure-identity","credentials","for","backward","compatibility",".","Adapt","credentials","from","azure-identity","to","be","compatible","with","SD","that","needs","msrestazure","or","azure.common.credentials","Check","https",":","\/\/stackoverflow.com\/questions\/63384092\/exception-attributeerror-defaultazurecredential-object-has-no-attribute-sig"]
docstr: Adapt azure-identity credentials for backward compatibility.
  
  :param credential: Any azure-identity credential (DefaultAzureCredential by default)
  :param resource_id: The scope to use to get the token (default ARM)
  :param managed_identity_client_id: The client ID of a user-assigned managed identity.
      If provided with `workload_identity_tenant_id`, they'll pass to ``DefaultAzureCredential``.
  :param workload_identity_tenant_id: ID of the application's Microsoft Entra tenant.
      Also called its "directory" ID.
      If provided with `managed_identity_client_id`, they'll pass to ``DefaultAzureCredential``.
docstr_tok: ["Adapt","azure-identity","credentials","for","backward","compatibility",".",":","param","credential",":","Any","azure-identity","credential","(","DefaultAzureCredential","by","default",")",":","param","resource_id",":","The","scope","to","use","to","get","the","token","(","default","ARM",")",":","param","managed_identity_client_id",":","The","client","ID","of","a","user-assigned","managed","identity",".","If","provided","with","`","workload_identity_tenant_id","`",",","they","'ll","pass","to","``","DefaultAzureCredential","``",".",":","param","workload_identity_tenant_id",":","ID","of","the","application","'s","Microsoft","Entra","tenant",".","Also","called","its","``","directory","''","ID",".","If","provided","with","`","managed_identity_client_id","`",",","they","'ll","pass","to","``","DefaultAzureCredential","``","."]
code: def __init__(
      self,
      credential=None,
      resource_id="https://management.azure.com/.default",
      *,
      managed_identity_client_id: str | None = None,
      workload_identity_tenant_id: str | None = None,
      **kwargs,
  ):
      """Adapt azure-identity credentials for backward compatibility.
  
      :param credential: Any azure-identity credential (DefaultAzureCredential by default)
      :param resource_id: The scope to use to get the token (default ARM)
      :param managed_identity_client_id: The client ID of a user-assigned managed identity.
          If provided with `workload_identity_tenant_id`, they'll pass to ``DefaultAzureCredential``.
      :param workload_identity_tenant_id: ID of the application's Microsoft Entra tenant.
          Also called its "directory" ID.
          If provided with `managed_identity_client_id`, they'll pass to ``DefaultAzureCredential``.
      """
      super().__init__(None)  # type: ignore[arg-type]
      if credential is None:
          credential = get_sync_default_azure_credential(
              managed_identity_client_id=managed_identity_client_id,
              workload_identity_tenant_id=workload_identity_tenant_id,
          )
      self._policy = BearerTokenCredentialPolicy(
          credential, resource_id, **kwargs
      )
  
file_path: airflow/airflow/providers/microsoft/azure/utils.py
imports: from __future__ import annotations
  import warnings
  from functools import partial, wraps
  from azure.core.pipeline import PipelineContext, PipelineRequest
  from azure.core.pipeline.policies import BearerTokenCredentialPolicy
  from azure.core.pipeline.transport import HttpRequest
  from azure.identity import DefaultAzureCredential
  from azure.identity.aio import DefaultAzureCredential
  from msrest.authentication import BasicTokenAuthentication
label_desc: Use image node_id 1 to create a new AzureIdentityCredentialAdapter object from inherited base classes: BasicTokenAuthentication with example: obj = AzureIdentityCredentialAdapter(credential, resource_id)