I have created a DAG in Airflow that will detect a file in Azure blob storage. This is a sensor that will detect the existence of a blob in Azure blob storage.
But it is failing repeatedly with the below error:
ValueError: client_id should be the id of a Microsoft Entra application
I have installed the required packages for it. apache-airflow-providers-microsoft-azure==12.7.0
I have created a connection to the Microsoft Azure blob using the below headers:
{
"account_name": "source",
"tenant_id": "\<tenant_id of the service principal\>",
"client_id": "\<client_id of the service principal\>",
"client_secret": "***"
}
Yet, it is throwing an error with the below code:
from airflow.sdk import dag, task
from airflow.providers.microsoft.azure.sensors.wasb import WasbBlobSensor
from datetime import datetime, timedelta
default_args = {
"owner": "airflow",
"retries": 6,
"retry_delay": timedelta(seconds=30)
}
@dag(dag_id="azure_blob_sensor_dag",default_args=default_args,start_date=datetime(2025, 10, 13),schedule=None,catchup=False,tags=["azure", "sensor"])
def sensor_dag():
wait_for_blob = WasbBlobSensor(
wasb_conn_id="azure_blob_connection",
container_name="source",
blob_name="citizens/citizens.csv",
poke_interval=30,
timeout=5 * 60
)
@task
def task_action():
print("File is present in ADLS")
wait_for_blob >> task_action()
sensor_dag()
I am not able to understand why it is throwing an error:
ValueError: client_id should be the id of a Microsoft Entra application
Because I have already mentioned the client_id of the service principal.
What else is it expecting?
How can I create my first ADLS sensor?