Get Your CertDatabricks Certified Generative AI Engineer AssociatePlayCompete
‹ All Databricks Certified Generative AI Engineer Associate questions

Databricks Generative AI Engineer Associate Practice Question 8: Agent Auth Passthrough Resources

Databricks Certified Generative AI Engineer Associate · Test 1 · question 8 of 10

Assembling and Deploying Applicationshard

An agent retrieves from an AI Search index, calls a Unity Catalog function as a tool, and calls a Foundation Model APIs endpoint. It works when run interactively in a notebook. The engineer logs it with mlflow.pyfunc.log_model(), registers it to Unity Catalog, and deploys it with agents.deploy(). The deployed endpoint then fails with permission errors on the index and the function. The endpoint's creator has access to all three resources.

The fix must not place long-lived credentials in the agent. What should the engineer do?

Select one answer
Show answer and explanation

Answer:

  • D. Re-log the agent declaring each dependency in resources, then register and deploy it again

Deployed agents on Model Serving reach Databricks resources through automatic authentication passthrough. For this to work, you declare every dependency when logging the agent, using the resources parameter of log_model() with classes such as DatabricksVectorSearchIndex, DatabricksFunction, and DatabricksServingEndpoint. At deployment, Databricks checks that the endpoint creator can access those resources. It then grants a service principal access and injects short-lived credentials into the endpoint. The notebook worked because it ran with the engineer's own identity. The troubleshooting guidance for deployed-agent authentication errors is to verify that the agent was logged with the necessary resources.

Option A would work, but a personal access token is exactly the long-lived credential the stem rules out. It also ties the agent to one person's account.

Option B is wrong. Automatic passthrough does not run as the calling user, so granting end users privileges does not change the credentials the endpoint uses. Per-user identity is a separate feature, on-behalf-of-user authentication.

Option C only adds logging. It helps you observe the failures but does not grant access.

Reference: Authentication for AI agents (Model Serving)

Practice Test 1 ›

Study guides for Databricks Certified Generative AI Engineer Associate