cancel
Showing results for 
Search instead for 
Did you mean: 
Generative AI
Explore discussions on generative artificial intelligence techniques and applications within the Databricks Community. Share ideas, challenges, and breakthroughs in this cutting-edge field.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to authenticate Vector Search Retriever Tool in Databricks AI Agent App?

atharvaghodekar
New Contributor III

I’m getting the following error while building a Databricks AI Agent app:

databricks.vector_search.exceptions.InvalidInputException: Please specify either personal access token or service principal client ID and secret.

My code looks like this:

 
vector_search_tools = [ VectorSearchRetrieverTool( index_name="vs_endpoint" ) ]

I tried passing a Databricks PAT token, but I still see the same error. Do I need to provide a client ID and secret as well? From my understanding, the service principal for app is Databricks-managed and created automatically—so how can I get the credentials?

1 REPLY 1

szymon_dybczak
Esteemed Contributor III

Hi @atharvaghodekar ,

AI agents support 3 authentication methods:

- automatic authentication passthrough

-  on-behalf-of-use authentication (OBO)

- manual authentication 

In case of manual authentication you need to explicitly provide credentials using environment variables.

With OBO, agent runs with the permissions of the end user making the request.

And automatic authentication passthrough let agent run with the permissions of the user who deployed it. (But not all resources supports this authentication methods).


For more details check following docs page. There's an example of how to authenticate to Vector Search Retriever Tool using OBO authentication:



Authentication for AI agents - Azure Databricks | Microsoft Learn