Skip to content

Auth token warning using oauth M2M #702

@septponf

Description

@septponf

This was originally posted in dbt-databricks project and I was asked to cross post i here.

Related to: databricks/dbt-databricks#1246

When running dbt in an Azure Devops Agent (for continues integration reasons) I get this warning:

09:13:52  Concurrency: 6 threads (target='test')
09:13:52  
09:13:53  databricks-sql-connector adapter: Token exchange failed, using external token: %s
WARNING:databricks.sql.auth.token_federation:Token exchange failed, using external token: 'access_token'

It still works, the project runs, but I would like to understand what might be happening here.
I am not able to reproduce this on my local machine using the same M2M profile.
Maybe you can point me in the right direction?

Profile using an azure service principal:

    test:
      host: the_host
      http_path: the_path
      catalog: the_catalog
      schema: test
      threads: 6
      type: databricks
      auth_type: oauth
      azure_client_id: "{{ env_var('DATABRICKS_CLIENT_ID') }}"
      azure_client_secret: "{{ env_var('DATABRICKS_CLIENT_SECRET') }}"

Python 3.11.13
Running with dbt=1.10.8
Registered adapter: databricks=1.10.9

The Devops Azure Agent runs an ubuntu-24.04 Image
Version: 20250929.60.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions