NandiniN
Databricks Employee
Databricks Employee

Hi @rcatelli 

Here's a quick example

https://docs.databricks.com/aws/en/dev-tools/databricks-apps/auth#user-authorization

https://docs.databricks.com/aws/en/dev-tools/databricks-apps/auth#example-query-with-user-authorizat... 

Get the user token from the Streamlit context headers: st.context.headers.get("x-forwarded-access-token").

Set it into DATABRICKS_TOKEN before calling get_deploy_client("databricks") so the request runs OBO. The Deployments client reads DATABRICKS_HOST and DATABRICKS_TOKEN from env vars.

The Streamlit helper you’re using (query_endpoint) does not accept a headers parameter.

Please let me know if this helps. 

Thanks!