Skip to content
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

Can't use Managed Identity and supply token for Auth #332

Open
dylanw-oss opened this issue Jun 21, 2024 · 0 comments · May be fixed by #333
Open

Can't use Managed Identity and supply token for Auth #332

dylanw-oss opened this issue Jun 21, 2024 · 0 comments · May be fixed by #333

Comments

@dylanw-oss
Copy link

Description

Can't use Managed Identity and supply token for Auth

Reproduction Steps

Generate and supply token to base file-system class

token_credential = get_token_credential()
access_token = token_credential.get_token("https://datalake.azure.net/.default")
adls_client = core.AzureDLFileSystem(access_token, store_name=adls_account_name)

Got error:

    adls_client = core.AzureDLFileSystem(access_token, store_name=adls_account_name)
  File "/usr/lib/python3.9/site-packages/azure/datalake/store/core.py", line 72, in __init__
    self.connect()
  File "/usr/lib/python3.9/site-packages/azure/datalake/store/core.py", line 90, in connect
    self.azure = DatalakeRESTInterface(token=self.token, req_timeout_s=self.per_call_timeout_seconds, **self.kwargs)
  File "/usr/lib/python3.9/site-packages/azure/datalake/store/lib.py", line 285, in __init__
    self._check_token()  # Retryable method. Will ensure that signed_session token is current when we set it on next line
  File "/usr/lib/python3.9/site-packages/azure/datalake/store/lib.py", line 313, in _check_token
    cur_session = self.token.signed_session()
AttributeError: 'AccessToken' object has no attribute 'signed_session'

Environment summary

SDK Version: What version of the SDK are you using? (pip show azure-datalake-store)
0.0.53

Python Version: What Python version are you using? Is it 64-bit or 32-bit?
3.8

OS Version: What OS and version are you using?
WSL+Ubuntu 22.04

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)

@akharit akharit linked a pull request Jul 12, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant