Merge pull request #9135 from you-n-g/add_mi_cred_pr

feature: Handle ManagedIdentityCredential in Azure AD token provider
This commit is contained in:
Krish Dholakia 2025-03-11 06:52:36 -07:00 committed by GitHub
commit 64bbc8508f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,6 +30,8 @@ def get_azure_ad_token_provider() -> Callable[[], str]:
client_secret=os.environ["AZURE_CLIENT_SECRET"],
tenant_id=os.environ["AZURE_TENANT_ID"],
)
elif cred == "ManagedIdentityCredential":
credential = cred_cls(client_id=os.environ["AZURE_CLIENT_ID"])
else:
credential = cred_cls()