Azure AI Search can't connect to Azure SQL Database

George R 40 Reputation points
2026-07-02T14:39:33.12+00:00

Hi there,

I created a Search service (Foundry IQ) service called "pim-ai-resource" and can't connect my SQL data to it. even though my IP is allowed and the User ID is correct. The Networking settings of both allow my IP and both have "Allow Azure Services to connect" ticked. See attached for the picture of the error.

I want to connect a View (vw_ProductSearchIndex), but with the error I tried the database connection and it still failed. User's image

Azure AI Search
Azure AI Search

An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.


Answer accepted by question author
Praneeth Maddali 12,670 Reputation points Microsoft External Staff Moderator
2026-07-23T08:35:39.3066667+00:00

Hi @George R

As discussed with you offline on Teams, we understand that the issue was related to the Azure portal's Import and Vectorize Data wizard. The wizard initially failed with a "Failed to fetch" error and was also unable to discover the Azure OpenAI resource in the dropdown, which appears to be related to a portal-side enumeration/permission issue.

As a workaround, you successfully bypassed the portal wizard and created the required Azure AI Search components (Data Source, Index, Skillset, and Indexer) using a PowerShell script and REST APIs. The script authenticated using the Azure AI Search Admin Key, which uses resource-level authentication and avoided the portal permission issue. The script completed successfully, and all product data was indexed as expected.

Since the workaround has resolved the issue and the desired functionality is now working, we will proceed with case closure. If you need any further assistance in the future, please feel free to reach out.

Thank you for your time and cooperation.

Please do click "Accept the answer” and Yes, this can be beneficial to other community members.

If you have any other questions, let me know in the "comments" and I would be happy to help you

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Newest
  1. Christos Panagiotidis 3,551 Reputation points
    2026-07-15T08:17:54.17+00:00

    The screenshot shows an unsupported combination: vw_ProductSearchIndex is a view, but SQL Integrated Change Tracking Policy is selected. That policy works only with tables.

    For a view, select High Water Mark Change Detection and expose a monotonically increasing column in the view (preferably rowversion, otherwise a reliably updated timestamp). If you need SQL integrated change tracking and automatic deletion detection, index a table instead.

    Also confirm that agent_readonly is a contained user in DocumentIntelligenceDB with SELECT on the view, and that the view returns a single unique, non-null column suitable as the search index key. If the Foundry wizard still shows the generic browser-side Failed to fetch, create the SQL data source under the Search service's Data sources page and run an indexer; its execution history will show the actual SQL or network error.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.