This is an automated email from the ASF dual-hosted git repository.

weilee pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new c65c7fd0d45 Ensure presence of conn.login in microsoft azure hook 
before usage (#64241)
c65c7fd0d45 is described below

commit c65c7fd0d45401768813014bbac65874d2d1fd63
Author: Amogh Desai <[email protected]>
AuthorDate: Thu Mar 26 12:28:35 2026 +0530

    Ensure presence of conn.login in microsoft azure hook before usage (#64241)
---
 .../airflow/providers/microsoft/azure/hooks/container_registry.py  | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/container_registry.py
 
b/providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/container_registry.py
index 79d412e136c..12f4a300fc8 100644
--- 
a/providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/container_registry.py
+++ 
b/providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/container_registry.py
@@ -110,6 +110,13 @@ class AzureContainerRegistryHook(BaseHook):
             resource_group = self._get_field(extras, "resource_group")
             managed_identity_client_id = self._get_field(extras, 
"managed_identity_client_id")
             workload_identity_tenant_id = self._get_field(extras, 
"workload_identity_tenant_id")
+
+            if not conn.login:
+                raise ValueError(
+                    f"Connection {self.conn_id} must have a login/username 
configured "
+                    "when using Azure AD authentication"
+                )
+
             credential = get_sync_default_azure_credential(
                 managed_identity_client_id=managed_identity_client_id,
                 workload_identity_tenant_id=workload_identity_tenant_id,

Reply via email to