René's URL Explorer Experiment


Title: Default authentication chain doesn't work on Databricks Apps · Issue #651 · databricks/databricks-sql-python · GitHub

Open Graph Title: Default authentication chain doesn't work on Databricks Apps · Issue #651 · databricks/databricks-sql-python

X Title: Default authentication chain doesn't work on Databricks Apps · Issue #651 · databricks/databricks-sql-python

Description: I am developing a Streamlit app for deployment to Databricks Apps. I am having trouble getting the same authentication flow to work both locally as well as on Databricks Apps. Consider the following snippet: from databricks import sql wi...

Open Graph Description: I am developing a Streamlit app for deployment to Databricks Apps. I am having trouble getting the same authentication flow to work both locally as well as on Databricks Apps. Consider the followin...

X Description: I am developing a Streamlit app for deployment to Databricks Apps. I am having trouble getting the same authentication flow to work both locally as well as on Databricks Apps. Consider the followin...

Opengraph URL: https://github.com/databricks/databricks-sql-python/issues/651

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Default authentication chain doesn't work on Databricks Apps","articleBody":"I am developing a Streamlit app for deployment to Databricks Apps. I am having trouble getting the same authentication flow to work both locally as well as on Databricks Apps.\n\nConsider the following snippet:\n\n```python\nfrom databricks import sql\n\nwith sql.connect(\n    server_hostname=host,\n    http_path=http_path,\n    catalog=catalog,\n) as connection:\n    with connection.cursor() as cursor:\n        cursor.execute(\"SELECT 1\")\n        result = cursor.fetchall()\n```\n\nThis works fine locally.\n\nHowever, when I deploy this to Databricks Apps, it just hangs forever.\n\nI figured out that to get this snippet to work on Databricks Apps, it needs this tweak:\n\n```python\nfrom databricks.sdk.core import Config\n\nwith sql.connect(\n    server_hostname=host,\n    http_path=http_path,\n    catalog=catalog,\n    credentials_provider=lambda: Config().authenticate,\n) as connection:\n    ...\n```\n\nThis works on Databricks Apps, but now when I try to run it locally I get a new error:\n\n```\nValueError: default auth: cannot configure default credentials, please check \nhttps://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication\nto configure credentials for your preferred authentication method.\n```\n\nOK great. I have one thing that works locally but not on Databricks Apps, and another that works the other way around.\n\nUsing [the tip shared here][1], I combined these into a hybrid approach that seems to work both locally and on Databricks Apps:\n\n```python\nfrom databricks.sdk.core import Config, databricks_cli\n\ndef universal_databricks_credentials_provider():\n    try:\n        return databricks_cli(Config(host=host))\n    except:\n        return Config().authenticate\n\nwith sql.connect(\n    server_hostname=host,\n    http_path=http_path,\n    catalog=catalog,\n    credentials_provider=universal_databricks_credentials_provider,\n) as connection:\n    ...\n```\n\nBut this is all very awkward and unpleasant.\n\nI think the default authentication chain that this library uses should work on Databricks Apps so that I don't have to specify `credentials_provider`.\n\n[1]: https://github.com/databricks/databricks-sql-python/issues/148#issuecomment-2271561365","author":{"url":"https://github.com/nchammas","@type":"Person","name":"nchammas"},"datePublished":"2025-07-23T20:13:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/651/databricks-sql-python/issues/651"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:80bcdd84-2559-621d-c41d-193122fcddbf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC6F6:3BB2E8:15F9CDA:1EB9BBC:6970D364
html-safe-nonce4d3a3515ea59c1d34e056e50a4ab99fa7718923edf7645f7c29c160ebddb3d87
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkY2OjNCQjJFODoxNUY5Q0RBOjFFQjlCQkM6Njk3MEQzNjQiLCJ2aXNpdG9yX2lkIjoiMjk2NjU5MTk5ODI1MzkxMjkzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1cd7ab9dab81582648d428e2d2eaaeb9496faf38994ff729b76af29068f745f8
hovercard-subject-tagissue:3257580978
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/databricks/databricks-sql-python/651/issue_layout
twitter:imagehttps://avatars.githubusercontent.com/u/4998052?s=400&v=4
twitter:cardsummary
og:imagehttps://avatars.githubusercontent.com/u/4998052?s=400&v=4
og:image:altI am developing a Streamlit app for deployment to Databricks Apps. I am having trouble getting the same authentication flow to work both locally as well as on Databricks Apps. Consider the followin...
og:site_nameGitHub
og:typeobject
og:author:usernamenchammas
hostnamegithub.com
expected-hostnamegithub.com
None034aaee9edccd455c18591b13122193c6e12dc773e8a203be73abe934f3e3a72
turbo-cache-controlno-preview
go-importgithub.com/databricks/databricks-sql-python git https://github.com/databricks/databricks-sql-python.git
octolytics-dimension-user_id4998052
octolytics-dimension-user_logindatabricks
octolytics-dimension-repository_id493695132
octolytics-dimension-repository_nwodatabricks/databricks-sql-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id493695132
octolytics-dimension-repository_network_root_nwodatabricks/databricks-sql-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release52d1d534d0b88c64972e852deb460d09b433b8b2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/databricks/databricks-sql-python/issues/651#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatabricks%2Fdatabricks-sql-python%2Fissues%2F651
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatabricks%2Fdatabricks-sql-python%2Fissues%2F651
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=databricks%2Fdatabricks-sql-python
Reloadhttps://patch-diff.githubusercontent.com/databricks/databricks-sql-python/issues/651
Reloadhttps://patch-diff.githubusercontent.com/databricks/databricks-sql-python/issues/651
Reloadhttps://patch-diff.githubusercontent.com/databricks/databricks-sql-python/issues/651
databricks https://patch-diff.githubusercontent.com/databricks
databricks-sql-pythonhttps://patch-diff.githubusercontent.com/databricks/databricks-sql-python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fdatabricks%2Fdatabricks-sql-python
Fork 132 https://patch-diff.githubusercontent.com/login?return_to=%2Fdatabricks%2Fdatabricks-sql-python
Star 218 https://patch-diff.githubusercontent.com/login?return_to=%2Fdatabricks%2Fdatabricks-sql-python
Code https://patch-diff.githubusercontent.com/databricks/databricks-sql-python
Issues 85 https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/issues
Pull requests 44 https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/pulls
Actions https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/actions
Projects 0 https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/projects
Wiki https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/security
Please reload this pagehttps://patch-diff.githubusercontent.com/databricks/databricks-sql-python/issues/651
Insights https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/pulse
Code https://patch-diff.githubusercontent.com/databricks/databricks-sql-python
Issues https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/issues
Pull requests https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/pulls
Actions https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/actions
Projects https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/projects
Wiki https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/wiki
Security https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/security
Insights https://patch-diff.githubusercontent.com/databricks/databricks-sql-python/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/databricks/databricks-sql-python/issues/651
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/databricks/databricks-sql-python/issues/651
Default authentication chain doesn't work on Databricks Appshttps://patch-diff.githubusercontent.com/databricks/databricks-sql-python/issues/651#top
https://github.com/nchammas
https://github.com/nchammas
nchammashttps://github.com/nchammas
on Jul 23, 2025https://github.com/databricks/databricks-sql-python/issues/651#issue-3257580978
the tip shared herehttps://github.com/databricks/databricks-sql-python/issues/148#issuecomment-2271561365
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.