Skip to content

Microsoft-Azure - ms graph hook - Tenant ID fetched from wrong extra_dejson key. #41399

@w0ut0

Description

@w0ut0

Apache Airflow Provider(s)

microsoft-azure

Versions of Apache Airflow Providers

apache-airflow==2.9.1
apache-airflow-providers-microsoft-azure==10.1.1

Apache Airflow version

2.9.1

Operating System

Ubuntu 22.04.4 LTS

Deployment

Official Apache Airflow Helm Chart

Deployment details

The general Azure connection has parameter tenantId.

However, the MS Graph operators look for the key tenant_id (code).

What happened

{msgraph.py:214} INFO - Tenant id: None
(....)
ERROR - tenant_id should be an Azure Active Directory tenant's id (also called its 'directory id')

What you think should happen instead

The tenant_id should be read from extra_dejson.tenantId instead of extra_dejson.tenant_id. We can keep both to maintain backwards compatibility.

How to reproduce

  • Create a Microsoft Azure connection with client_id, client_secret and tenant id.
  • Try to use the Microsoft Graph API Operator

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions