Apache Airflow version
2.6.3
What happened
When using AzureBaseHook from airflow/providers/microsoft/azure/hooks/base_azure.py with SDKClient class, the get_conn() method fails to instanciate the Client class object.
The error message says, missing parameter credential
This is because the sdk_client is being instanciated with credentials=ServicePrincipalCredentials
Notice an extra s in credentials key which is not needed.
What you think should happen instead
The sdk_client should be instanciated with credential=ServicePrincipalCredential which will be instanciated correctly
How to reproduce
-
Install any Azure client, let's say azure-monitor-query
pip install azure-monitor-query
-
Use the Azure connection with Azure client
from airflow.providers.microsoft.azure.hooks.base_azure import AzureBaseHook
from azure.monitor.query import LogsQueryClient
# Lets say we have an azure connection with name Azure_Default
conn = AzureBaseHook(sdk_client = LogsQueryClient, conn_id = 'Azure_Default')
client = conn.get_conn()
This will fail -
Operating System
Any
Versions of Apache Airflow Providers
apache-airflo-providers-microsoft-azure v6.2.1
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct