<?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 DatabricksFunctionClient : PERMISSION_DENIED when creating the client in Generative AI</title>
    <link>https://community.databricks.com/t5/generative-ai/databricksfunctionclient-permission-denied-when-creating-the/m-p/113181#M800</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently working with Databricks features to create an AI agent system.&amp;nbsp;&lt;BR /&gt;In the documentation it's written that the library&amp;nbsp;&lt;SPAN&gt;DatabricksFunctionClient is needed to register custom tools to UC.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I followed the different steps from the explanations but when i want to run the code i'm getting a&amp;nbsp;&lt;SPAN&gt;error.&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;SparkConnectGrpcException: &lt;/SPAN&gt;PERMISSION_DENIED: Cannot access Spark Connect.&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BriceBuso_1-1742486473481.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/15534iFFAA6D53A14277BF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BriceBuso_1-1742486473481.png" alt="BriceBuso_1-1742486473481.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;A href="https://docs.unitycatalog.io/ai/quickstart/" target="_blank" rel="noopener"&gt;https://docs.unitycatalog.io/ai/quickstart/&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Did you already got this issue ?&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Brice.&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 20 Mar 2025 16:02:39 GMT</pubDate>
    <dc:creator>BriceBuso</dc:creator>
    <dc:date>2025-03-20T16:02:39Z</dc:date>
    <item>
      <title>DatabricksFunctionClient : PERMISSION_DENIED when creating the client</title>
      <link>https://community.databricks.com/t5/generative-ai/databricksfunctionclient-permission-denied-when-creating-the/m-p/113181#M800</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently working with Databricks features to create an AI agent system.&amp;nbsp;&lt;BR /&gt;In the documentation it's written that the library&amp;nbsp;&lt;SPAN&gt;DatabricksFunctionClient is needed to register custom tools to UC.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I followed the different steps from the explanations but when i want to run the code i'm getting a&amp;nbsp;&lt;SPAN&gt;error.&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;SparkConnectGrpcException: &lt;/SPAN&gt;PERMISSION_DENIED: Cannot access Spark Connect.&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BriceBuso_1-1742486473481.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/15534iFFAA6D53A14277BF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BriceBuso_1-1742486473481.png" alt="BriceBuso_1-1742486473481.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;A href="https://docs.unitycatalog.io/ai/quickstart/" target="_blank" rel="noopener"&gt;https://docs.unitycatalog.io/ai/quickstart/&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Did you already got this issue ?&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Brice.&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Mar 2025 16:02:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/databricksfunctionclient-permission-denied-when-creating-the/m-p/113181#M800</guid>
      <dc:creator>BriceBuso</dc:creator>
      <dc:date>2025-03-20T16:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: DatabricksFunctionClient : PERMISSION_DENIED when creating the client</title>
      <link>https://community.databricks.com/t5/generative-ai/databricksfunctionclient-permission-denied-when-creating-the/m-p/126810#M1063</link>
      <description>&lt;P&gt;My bet would be the cluster type that you are using. Did you try using serverless cluster?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimmy_grimble_0-1753798933473.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/18596i9F7B62274582DD71/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jimmy_grimble_0-1753798933473.png" alt="jimmy_grimble_0-1753798933473.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.unitycatalog.io/ai/quickstart/#databricks-unity-catalog" target="_blank"&gt;Quickstart - Unity Catalog&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 14:23:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/databricksfunctionclient-permission-denied-when-creating-the/m-p/126810#M1063</guid>
      <dc:creator>jimmy_grimble</dc:creator>
      <dc:date>2025-07-29T14:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: DatabricksFunctionClient : PERMISSION_DENIED when creating the client</title>
      <link>https://community.databricks.com/t5/generative-ai/databricksfunctionclient-permission-denied-when-creating-the/m-p/138282#M1365</link>
      <description>&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;This error is most often due to missing permissions, workspace types, or cluster configuration settings necessary for AI agents and custom tools to access Unity Catalog (UC) functions using Spark Connect in Databricks. The main causes and solutions are detailed below.​&lt;/P&gt;
&lt;H2 class="mb-2 mt-4 font-display font-semimedium text-base first:mt-0"&gt;Common Causes&lt;/H2&gt;
&lt;UL class="marker:text-quiet list-disc"&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Your workspace might not be set up as a Serverless workspace, which is required for agents to execute UC functions as tools.​&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;The user account running DatabricksFunctionClient does not have explicit access (USAGE permission) to the relevant catalog/schema, or EXECUTE permission for the relevant functions in Unity Catalog.​&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;You are using a cluster type or Databricks Runtime version that does not support required permissions for Unity Catalog, such as single-user clusters with older runtimes.​&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;The group or user running the notebook does not have workspace access entitlements in Databricks.​&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2 class="mb-2 mt-4 font-display font-semimedium text-base first:mt-0"&gt;Solutions&lt;/H2&gt;
&lt;UL class="marker:text-quiet list-disc"&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;&lt;STRONG&gt;Serverless Workspace Setup:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Ensure the Databricks workspace is set up as Serverless before attempting to register tools or run agents.​&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;&lt;STRONG&gt;Granting Catalog and Schema Permissions:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Explicitly grant USAGE, EXECUTE, and MANAGE permissions on the relevant catalog and schema to your user email or group using SQL GRANT statements. Example:​&lt;/P&gt;
&lt;DIV class="w-full md:max-w-[90vw]"&gt;
&lt;DIV class="codeWrapper text-light selection:text-super selection:bg-super/10 my-md relative flex flex-col rounded font-mono text-sm font-normal bg-subtler"&gt;
&lt;DIV class="translate-y-xs -translate-x-xs bottom-xl mb-xl flex h-0 items-start justify-end md:sticky md:top-[100px]"&gt;
&lt;DIV class="overflow-hidden rounded-full border-subtlest ring-subtlest divide-subtlest bg-base"&gt;
&lt;DIV class="border-subtlest ring-subtlest divide-subtlest bg-subtler"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="-mt-xl"&gt;
&lt;DIV&gt;
&lt;DIV class="text-quiet bg-subtle py-xs px-sm inline-block rounded-br rounded-tl-[3px] font-thin" data-testid="code-language-indicator"&gt;text&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;CODE&gt;GRANT USAGE ON CATALOG `your_catalog` TO `&amp;lt;your-email&amp;gt;`;
GRANT USAGE ON SCHEMA `your_schema` TO `&amp;lt;your-email&amp;gt;`;
GRANT EXECUTE ON FUNCTION `your_function` TO `&amp;lt;your-email&amp;gt;`;
&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;&lt;STRONG&gt;Cluster and Runtime Configuration:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Use a shared cluster, serverless compute, or update the Databricks Runtime version to 15.4 or above. For single-user clusters, upgrade to the required runtime.​&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;&lt;STRONG&gt;Workspace Access Entitlements:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Make sure your user or group has the Workspace access entitlement enabled in Databricks workspace settings.​&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;If changing the workspace to Serverless or granting permissions does not resolve the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;SparkConnectGrpcException: PERMISSION_DENIED&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;error, double-check your cluster configuration and role-based access control, then retry with updated settings and entitlements.&lt;/P&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;These steps should resolve common permission denied issues when registering and invoking Databricks AI agent tools with Unity Catalog.​&lt;/P&gt;</description>
      <pubDate>Sun, 09 Nov 2025 14:22:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/databricksfunctionclient-permission-denied-when-creating-the/m-p/138282#M1365</guid>
      <dc:creator>mark_ott</dc:creator>
      <dc:date>2025-11-09T14:22:36Z</dc:date>
    </item>
  </channel>
</rss>

