<?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 Re: Neeed help with setting up a connection from Databricks to an Azure SQL Database with the REST A in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137448#M4340</link>
    <description>&lt;P&gt;Hi Nayan and Bianca,&lt;/P&gt;&lt;P&gt;Thanks for your replies.&lt;/P&gt;&lt;P&gt;The CI/CD pipeline I mentioned is the deployment pipeline I use to create/configure the connection. Not a pipeline that will use the connection (I hadn't thought of that yet, so your replies are very welcome).&lt;/P&gt;&lt;P&gt;So I want to create a U2M connection, which interactive users can use to query the Azure SQL database from their notebooks. I can do this within the Catalog Explorer, but do not succeed in creating it with the&amp;nbsp;&lt;SPAN&gt;REST API (or a SQL script).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Marco&lt;/P&gt;</description>
    <pubDate>Mon, 03 Nov 2025 19:37:21 GMT</pubDate>
    <dc:creator>Marco37</dc:creator>
    <dc:date>2025-11-03T19:37:21Z</dc:date>
    <item>
      <title>Neeed help with setting up a connection from Databricks to an Azure SQL Database with the REST API</title>
      <link>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137406#M4337</link>
      <description>&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;I need some help with automating a connection from databricks to an Azure SQL Database. I'am able to configure the connection with the UI (Catalog Explorer), but I also want to configure it with a REST API (or SQL script), so that I can integrate it in my CI/CD pipeline.&lt;/P&gt;&lt;P&gt;- I have created an App Registration in Entra and created a secret&lt;BR /&gt;- The Azure SQL Database is configured for Entra Authentication Only&lt;BR /&gt;- I use the U2M (OAuth) method&lt;/P&gt;&lt;P&gt;I use the REST API "/api/2.1/unity-catalog/connections" with the JSON file below.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "name": "testu2m",
  "connection_type": "SQLSERVER",
  "options": {
    "applicationIntent": "ReadOnly",
    "host": "sqlserver######.database.windows.net",
    "oauth_redirect_uri": "https://#########.azuredatabricks.net/login/oauth/azure.html",
    "client_id": "#########",
    "client_secret": "###########",
    "port": "1433",
    "authorization_endpoint": "https://login.microsoftonline.com/#############/oauth2/v2.0/authorize",
    "trustServerCertificate": "true",
    "oauth_scope": "https://database.windows.net/.default offline_access"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;When I call the REST API with this JSON file I receive this error:&lt;/P&gt;&lt;P&gt;| { "error_code": "INVALID_PARAMETER_VALUE", "message":&lt;BR /&gt;| "CONNECTION/CONNECTION_SQLSERVER_OAUTH_U2M must include the following&lt;BR /&gt;| option(s): pkce_verifier,authorization_code.", "details": [ {&lt;BR /&gt;| "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason":&lt;BR /&gt;| "MISSING_CONNECTION_OPTION", "domain":&lt;BR /&gt;| "unity-catalog.databricks.com", "metadata": {&lt;BR /&gt;| "securable_type": "CONNECTION", "securable_kind":&lt;BR /&gt;| "CONNECTION_SQLSERVER_OAUTH_U2M", "options":&lt;BR /&gt;| "pkce_verifier,authorization_code" } }, { "@type":&lt;BR /&gt;| "type.googleapis.com/google.rpc.RequestInfo", "request_id":&lt;BR /&gt;| "55f708b4-866e-4b97-8e85-b898bba16ac0", "serving_data": "" }&lt;BR /&gt;| ] }&lt;/P&gt;&lt;P&gt;It looks like I also need to supply the options or properties &lt;STRONG&gt;pkce_verifier&lt;/STRONG&gt; and &lt;STRONG&gt;authorization_code&lt;/STRONG&gt;, but I do not know where I can find this information.&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Marco&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2025 13:57:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137406#M4337</guid>
      <dc:creator>Marco37</dc:creator>
      <dc:date>2025-11-03T13:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Neeed help with setting up a connection from Databricks to an Azure SQL Database with the REST A</title>
      <link>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137434#M4338</link>
      <description>&lt;P&gt;Since U2M authorization_code is &lt;STRONG&gt;user-consent bound&lt;/STRONG&gt;, full automation is tricky. The recommended pattern for CI/CD is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Use a Service Principal connection&lt;/STRONG&gt; (machine-to-machine, “M2M”), not U2M.&lt;BR /&gt;That avoids any manual OAuth dance — you just store the client_id + client_secret + tenant_id.&lt;/P&gt;&lt;P&gt;Here’s a minimal M2M connection JSON example:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{
  "name": "sql-m2m-conn",
  "connection_type": "SQLSERVER",
  "options": {
    "host": "sqlserver######.database.windows.net",
    "port": "1433",
    "trustServerCertificate": "true",
    "oauth_type": "M2M",
    "client_id": "&amp;lt;service_principal_client_id&amp;gt;",
    "client_secret": "&amp;lt;service_principal_secret&amp;gt;",
    "tenant_id": "&amp;lt;tenant_id&amp;gt;",
    "oauth_scope": "https://database.windows.net/.default"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;This is the recommended method to integrate in CI/CD&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2025 17:06:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137434#M4338</guid>
      <dc:creator>nayan_wylde</dc:creator>
      <dc:date>2025-11-03T17:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Neeed help with setting up a connection from Databricks to an Azure SQL Database with the REST A</title>
      <link>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137444#M4339</link>
      <description>&lt;P&gt;Hi Marco,&lt;/P&gt;&lt;P&gt;The error you’re seeing&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"must include pkce_verifier, authorization_code"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;happens because you’re using the &lt;STRONG&gt;OAuth U2M (User-to-Machine)&lt;/STRONG&gt; flow. That method requires an &lt;STRONG&gt;interactive PKCE authorization&lt;/STRONG&gt; (browser sign-in) to generate authorization_code and pkce_verifier, so it isn’t suitable for automation or CI/CD.&lt;/P&gt;&lt;P&gt;Since your goal is to &lt;STRONG&gt;read data&lt;/STRONG&gt; and integrate this into a &lt;STRONG&gt;CI/CD pipeline&lt;/STRONG&gt;, I’d recommend switching to a &lt;STRONG&gt;Service Principal (M2M)&lt;/STRONG&gt; setup instead. It uses the &lt;STRONG&gt;client credentials&lt;/STRONG&gt; flow, no PKCE, no user interaction, and works perfectly with Databricks &lt;STRONG&gt;Lakehouse Federation&lt;/STRONG&gt; (for query-in-place) or &lt;STRONG&gt;LakeBridge&lt;/STRONG&gt; (for bulk migration).&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2025 18:56:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137444#M4339</guid>
      <dc:creator>bianca_unifeye</dc:creator>
      <dc:date>2025-11-03T18:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Neeed help with setting up a connection from Databricks to an Azure SQL Database with the REST A</title>
      <link>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137448#M4340</link>
      <description>&lt;P&gt;Hi Nayan and Bianca,&lt;/P&gt;&lt;P&gt;Thanks for your replies.&lt;/P&gt;&lt;P&gt;The CI/CD pipeline I mentioned is the deployment pipeline I use to create/configure the connection. Not a pipeline that will use the connection (I hadn't thought of that yet, so your replies are very welcome).&lt;/P&gt;&lt;P&gt;So I want to create a U2M connection, which interactive users can use to query the Azure SQL database from their notebooks. I can do this within the Catalog Explorer, but do not succeed in creating it with the&amp;nbsp;&lt;SPAN&gt;REST API (or a SQL script).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Marco&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2025 19:37:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137448#M4340</guid>
      <dc:creator>Marco37</dc:creator>
      <dc:date>2025-11-03T19:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Neeed help with setting up a connection from Databricks to an Azure SQL Database with the REST A</title>
      <link>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137524#M4363</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/114724"&gt;@Marco37&lt;/a&gt;&amp;nbsp;Marco, the error you’re seeing is expected for &lt;STRONG&gt;U2M (user-to-machine)&lt;/STRONG&gt; connections. This flow requires an &lt;STRONG&gt;interactive OAuth PKCE process&lt;/STRONG&gt;, where you must first obtain two one-time values before calling the API:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;authorization_code&lt;/STRONG&gt;&amp;nbsp; returned to your redirect URI after the user signs in&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;pkce_verifier&lt;/STRONG&gt;&amp;nbsp; the random string you initially generated when starting the PKCE flow&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Without these values, the API call will fail. You’ll need to perform the authorization step to generate the code and then use it immediately, as the &lt;STRONG&gt;authorization code is single-use and short-lived&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Once created, the U2M connection allows &lt;STRONG&gt;interactive users to query Azure SQL through Lakehouse Federation&lt;/STRONG&gt; using their &lt;STRONG&gt;delegated Entra ID credentials&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;That said, I’m curious, is there a specific reason you prefer U2M over &lt;STRONG&gt;M2M (service principal)&lt;/STRONG&gt;?&lt;BR /&gt;The M2M setup is generally simpler and more suitable for automation, as it avoids the manual authorization flow altogether.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 09:12:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137524#M4363</guid>
      <dc:creator>bianca_unifeye</dc:creator>
      <dc:date>2025-11-04T09:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Neeed help with setting up a connection from Databricks to an Azure SQL Database with the REST A</title>
      <link>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137573#M4374</link>
      <description>&lt;P&gt;Hi Bianca,&lt;/P&gt;&lt;P&gt;Thanks for your help. If I understand correctly the "authorization_code" and "pkce_verifier" are normally generated by the button "Sign in with Azure Entra ID" when I configure a connection through the Catalog Explorer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Schermafbeelding 2025-11-04 140428.jpg" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/21342iDF452BDBBC74378A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Schermafbeelding 2025-11-04 140428.jpg" alt="Schermafbeelding 2025-11-04 140428.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My organization is new to Databricks, so every question of our customers is a challenge for us. I tried to configure an U2M connection because I thought it was more secure to allow the users to connect the database with their own credentials, so I can configure database permissions in the database (which user is allowed to query which table). If I use the M2M method, everybody has the same permissions (the permissions of the service pricipal).&lt;/P&gt;&lt;P&gt;But M2M is indeed more suitable for automation and probably all users get the same permissions anyway.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kind Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Marco&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 13:07:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/137573#M4374</guid>
      <dc:creator>Marco37</dc:creator>
      <dc:date>2025-11-04T13:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Neeed help with setting up a connection from Databricks to an Azure SQL Database with the REST A</title>
      <link>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/148357#M4880</link>
      <description>&lt;P data-unlink="true"&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;I am facing similar issue while trying to create a databricks_connection resource in Terraform and provided json in this post doesn't seem to work and also based on &lt;A href="https://docs.databricks.com/aws/en/query-federation/sql-server-entra#-create-a-connection" target="_self"&gt;this document&lt;/A&gt;, you shouldn't provide "OAUTH_SCOPE" in the options for M2M type. Also trying to create the databricks_connection with different variations of options didn't work and specially it's not clear how to enforce the Auth type to be M2M.&lt;/P&gt;&lt;P data-unlink="true"&gt;Our deployment constantly is returning below error:&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Error: &lt;/SPAN&gt;&lt;SPAN class=""&gt;cannot create connection: CONNECTION/CONNECTION_SQLSERVER_OAUTH_U2M must include the following option(s): oauth_redirect_uri,pkce_verifier,authorization_code.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;Any type of help is much appreciated!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Feb 2026 17:27:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/neeed-help-with-setting-up-a-connection-from-databricks-to-an/m-p/148357#M4880</guid>
      <dc:creator>Mohammad_Renani</dc:creator>
      <dc:date>2026-02-13T17:27:18Z</dc:date>
    </item>
  </channel>
</rss>

