File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -546,6 +546,17 @@ def _initialize_azure_fs(self) -> FileSystem:
546546 if tenant_id := self .properties .get (ADLS_TENANT_ID ):
547547 client_kwargs ["tenant_id" ] = tenant_id
548548
549+ # Validate that all three are provided together for ClientSecretCredential
550+ credential_keys = ["client_id" , "client_secret" , "tenant_id" ]
551+ provided_keys = [key for key in credential_keys if key in client_kwargs ]
552+ if provided_keys and len (provided_keys ) != len (credential_keys ):
553+ missing_keys = [key for key in credential_keys if key not in client_kwargs ]
554+ raise ValueError (
555+ f"client_id, client_secret, and tenant_id must all be provided together "
556+ f"to use ClientSecretCredential for Azure authentication. "
557+ f"Provided: { provided_keys } , Missing: { missing_keys } "
558+ )
559+
549560 return AzureFileSystem (** client_kwargs )
550561
551562 def _initialize_hdfs_fs (self , scheme : str , netloc : Optional [str ]) -> FileSystem :
You can’t perform that action at this time.
0 commit comments