<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic OBO auth implementation in Streamlit not working in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/obo-auth-implementation-in-streamlit-not-working/m-p/141154#M51635</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently trying to implement OBO auth in&amp;nbsp; a streamlit db app but I'm getting the following error message:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN class=""&gt;requests.exceptions.HTTPError&lt;/SPAN&gt;:&amp;nbsp;400 Client Error: PERMISSION_DENIED: User does not have USE CATALOG on Catalog '...'. Config: host=, auth_type=model-serving, retry_timeout_seconds=500. Env: DATABRICKS_HOST for url: ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know I have access to the catalog it's saying I don't because I belong to a group that has access to it and besides I was able to execute in a notebook the USE CATALOG 'x' code successfully. So my belief is that I'm missing something to do OBO right.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This app queries an endpoint. Both have been granted permissions to access each other.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have already added scopes in the app, as well as auth policy with user and system policy included, and the resources the model needs to access to.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also when I try to pass&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;EM&gt;# --- Query the Databricks endpoint ---&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with st.chat_message("assistant"):&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response = query_endpoint(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endpoint_name=SERVING_ENDPOINT,&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; messages=st.session_state.messages,&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_tokens=600&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #headers=forward_headers &amp;nbsp;# Pass the user's token for OBO&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It says that headers is not a valid parameter.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;Could you please help?&amp;nbsp; The documentation is not that complete either so I don't know what I could be missing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#OBO #OBOauth #streamlitapp&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Dec 2025 12:21:09 GMT</pubDate>
    <dc:creator>rcatelli</dc:creator>
    <dc:date>2025-12-04T12:21:09Z</dc:date>
    <item>
      <title>OBO auth implementation in Streamlit not working</title>
      <link>https://community.databricks.com/t5/data-engineering/obo-auth-implementation-in-streamlit-not-working/m-p/141154#M51635</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently trying to implement OBO auth in&amp;nbsp; a streamlit db app but I'm getting the following error message:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN class=""&gt;requests.exceptions.HTTPError&lt;/SPAN&gt;:&amp;nbsp;400 Client Error: PERMISSION_DENIED: User does not have USE CATALOG on Catalog '...'. Config: host=, auth_type=model-serving, retry_timeout_seconds=500. Env: DATABRICKS_HOST for url: ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know I have access to the catalog it's saying I don't because I belong to a group that has access to it and besides I was able to execute in a notebook the USE CATALOG 'x' code successfully. So my belief is that I'm missing something to do OBO right.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This app queries an endpoint. Both have been granted permissions to access each other.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have already added scopes in the app, as well as auth policy with user and system policy included, and the resources the model needs to access to.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also when I try to pass&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;EM&gt;# --- Query the Databricks endpoint ---&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with st.chat_message("assistant"):&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response = query_endpoint(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endpoint_name=SERVING_ENDPOINT,&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; messages=st.session_state.messages,&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_tokens=600&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #headers=forward_headers &amp;nbsp;# Pass the user's token for OBO&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It says that headers is not a valid parameter.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;Could you please help?&amp;nbsp; The documentation is not that complete either so I don't know what I could be missing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#OBO #OBOauth #streamlitapp&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 12:21:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/obo-auth-implementation-in-streamlit-not-working/m-p/141154#M51635</guid>
      <dc:creator>rcatelli</dc:creator>
      <dc:date>2025-12-04T12:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: OBO auth implementation in Streamlit not working</title>
      <link>https://community.databricks.com/t5/data-engineering/obo-auth-implementation-in-streamlit-not-working/m-p/143486#M52185</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/199770"&gt;@rcatelli&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a quick example&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/dev-tools/databricks-apps/auth#user-authorization" target="_blank"&gt;https://docs.databricks.com/aws/en/dev-tools/databricks-apps/auth#user-authorization&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/dev-tools/databricks-apps/auth#example-query-with-user-authorization" target="_blank"&gt;https://docs.databricks.com/aws/en/dev-tools/databricks-apps/auth#example-query-with-user-authorization&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Get the user token from the Streamlit context headers: &lt;CODE class="p8i6j0f"&gt;st.context.headers.get("x-forwarded-access-token")&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;Set it into &lt;CODE class="p8i6j0f"&gt;DATABRICKS_TOKEN&lt;/CODE&gt; before calling &lt;CODE class="p8i6j0f"&gt;get_deploy_client("databricks")&lt;/CODE&gt; so the request runs OBO. The Deployments client reads &lt;CODE class="p8i6j0f"&gt;DATABRICKS_HOST&lt;/CODE&gt; and &lt;CODE class="p8i6j0f"&gt;DATABRICKS_TOKEN&lt;/CODE&gt; from env vars.&lt;/P&gt;
&lt;P&gt;The Streamlit helper you’re using (&lt;CODE class="p8i6j0f"&gt;query_endpoint&lt;/CODE&gt;) does not accept a &lt;CODE class="p8i6j0f"&gt;headers&lt;/CODE&gt; parameter.&lt;/P&gt;
&lt;P&gt;Please let me know if this helps.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jan 2026 14:00:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/obo-auth-implementation-in-streamlit-not-working/m-p/143486#M52185</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2026-01-09T14:00:02Z</dc:date>
    </item>
  </channel>
</rss>

