-
Notifications
You must be signed in to change notification settings - Fork 16.4k
also try to fetch Tenant Id from extra_dejson.tenantId instead of ext… #41400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ra_dejson.tenant_id
| client_secret = connection.password | ||
| config = connection.extra_dejson if connection.extra else {} | ||
| tenant_id = config.get("tenant_id") | ||
| tenant_id = config.get("tenantId") or config.get("tenant_id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to change this then we should deprecate the old one.
But also, lets verify all settings. We should not mix two types of syntax's.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@w0ut0 thanks for your PR. I would do following:
tenant_id = config.get(“tenant_id”) or config.get(“tenantId”)
No need to check the connection type. I would like to also use the Azure connection type in the future for the MSGraphAsyncOperator as that would make more sense but then some changes would not to be done on the Azure connection type. This would also be interesting for the PR regarding the PowerBi dataset operator of @ambika-garg. But as I said that would require some changes in the Azure connection type, something I didn’t want to mess with yet when I introduced the MSGraphOperator.
|
So it seems that the MS Graph operator does not expect an Azure Connection, but rather an HTTP connection, with extra_dejson My use case is that we use the same credentials (service principals) to authenticate the Airflow instance, both to the Azure Resource Manager, as well as to the MS Graph API. Alternatively, we can raise an exception if the supplied cc @dabla |
the connection type being `http` or `azure`.
We could raise an exception once the MSGraph operator would require an Azure connection type, something that would be nice once all parameters vould also be specified in the Azure connection type. At the moment I would keep the original solution and allow both cases with conn_type check. Maybe add a unit test which also test the other tenantId case. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Microsoft graph API operator: try to fetch Tenant Id from extra_dejson.tenantId instead of extra_dejson.tenant_id
fixes #41399
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.