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
Is it possible to use oauth generated token instead of personal access token? #271
Comments
This sounds similar to issue #255.
In this scenario, I am using MSAL to get the authentication tokens, and sqlalchemy to manage the databricks connection. It would be nice if the databricks library supported token generation and refresh, but hopefully this snippet above helps. |
Does msal work with AWS etc? |
Probably not. I used MSAL because my application connects to Azure databricks, and MSAL takes care of caching the temporary tokens. I looked into it briefly and it looks like AWS has their own authentication library: boto3 I'm guessing you can do the same thing I did above with boto3, replacing |
This is exactly what I was looking for. Thank you. I will now need to try to get it work, thanks.
This bit is less immediately important to me if the above works. Of course not needing to install the sdk would be nice in principle, but I really dont care that much in practice. |
I would like my app to not be dependent on a particular user still being at the company. My app gets data using
databricks-sql-python
and currently uses a personal access token (pat). created by my user.I have created a service principal and generated an oauth secret and this seems like a more robust way to authenticate my app to
databricks-sql-python
. But I can not figure out how to do it. I see that this lib has code that seems to be for using oauth, but the docs only explain pats. I know I should not simply code in a curl call manually. But I am not even sure that it would work since theaccess_token
arg is only ever shown to be given pats.Is there a way to do this? and if so Is there a way to use OAuth python libs to manage the fetching and refreshing of tokens?
Alternatively: I do not see this library on the list of tools that use client unified authentication. But does it?
The text was updated successfully, but these errors were encountered: