adamwhitneysoftwire opened a new issue, #29980:
URL: https://github.com/apache/airflow/issues/29980

   ### Apache Airflow Provider(s)
   
   microsoft-azure
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-microsoft-azure 5.2.1
   
   ### Apache Airflow version
   
   2.5.1
   
   ### Operating System
   
   Ubuntu 18.04
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   When attempting to use Azure Active Directory application to connect to 
Azure Data Lake Storage Gen2 hook, the generated account URL sent to the 
DataLakeServiceClient is incorrect.
   
   It substitutes in the Client ID (`login` field) where the storage account 
name should be.
   
   ### What you think should happen instead
   
   The `host` field on the connection form should be used to store the storage 
account name and should be used to fill the account URL for both Active 
Directory and Key-based authentication.
   
   ### How to reproduce
   
   1. Create an "Azure Data Lake Storage V2" connection (adls) and put the AAD 
application Client ID into `login` field, Client secret into `password` field 
and Tenant ID into `tenant_id` field.
   2. Attempt to perform any operations with the `AzureDataLakeStorageV2Hook` 
hook.
   3. Notice how it fails, and that the URL in the logs is incorrectly 
`https://{client_id}.dfs.core.windows.net/...`, when it should be 
`https://{storage_account}.dfs.core.windows.net/...`
   
   This can be fixed by:
   1. Making your own copy of the hook.
   2. Entering the storage account name into the `host` field (currently 
labelled "Account Name (Active Directory Auth)").
   3. Editing the `get_conn` method to substitute `conn.host` into the 
`account_url` (instead of `conn.login`).
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to