Share via

Need help resolving tool_user_error: Error: search_vectorization_error; Azure AI Search was unable to vectorize the search query. () Could not complete vectorization action.

Choi Daniel 0 Reputation points
2025-11-11T07:23:03.4+00:00

(Image in private message: PII information)
I have already set up access to Azure Storage and deployed two models for this project, but now I'm getting this error when I attempt to make my agent perform RAG operations. Any help would be appreciated

tool_user_error: Error: search_vectorization_error; Azure AI Search was unable to vectorize the search query. () Could not complete vectorization action. The service failed to authenticate to the vectorization endpoint. Code: Message: Could not complete vectorization action. The service failed to authenticate to the vectorization endpoint. RunId: run_c2h7GzbacasJeSBHnXS9tVVm

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.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Nikhil Jha (Accenture International Limited) 4,325 Reputation points Microsoft External Staff Moderator
    2025-12-22T10:07:50.59+00:00

    Hello Choi Daniel,

    I understand you are encountering a search_vectorization_error when your agent attempts RAG (Retrieval-Augmented Generation) operations.

    The specific detail in your error message—"The service failed to authenticate to the vectorization endpoint" indicates that while your search index is configured to use a model for vectorization, the Azure AI Search service itself does not have the permission to "talk" to your Azure OpenAI embedding model.


    In a RAG architecture using "Integrated Vectorization," your search service acts as a client. When a user asks a question, Azure AI Search must send that text to an embedding model (like text-embedding-3-small) to convert it into numbers (vectors) before it can search the index.

    If Azure AI Search cannot authenticate with Azure OpenAI, the process fails before the search even begins. This usually happens for one of two reasons:

    1. Identity/RBAC Issue: The Search service's Managed Identity hasn't been granted the "Cognitive Services OpenAI User" role
    2. Network/Firewall Issue: The OpenAI resource is behind a firewall and hasn't whitelisted the Search service.

    Recommended Steps

    1: Assign the "Cognitive Services OpenAI User" Role

    Azure AI Search needs explicit permission to use your OpenAI deployment.

    2: Verify the Search Service Identity

    Ensure that Managed Identity is actually enabled on your Search service.

    1. Navigate to your Azure AI Search resource in the portal.
    2. Select Identity (under Settings).
    3. Ensure the Status is set to On (System assigned). If it was off, you must turn it on and then repeat Step 1.

    3: Check Networking

    If your Azure OpenAI resource has "Public network access" set to "Disabled" or "Selected networks":

    • Navigate to the Networking tab of your Azure OpenAI resource.
    • Ensure that "Allow Azure services on the trusted services list to access this storage account" (or equivalent for AI services) is checked.
    • Alternatively, ensure you have a Private Endpoint configured between the Search service and the OpenAI service.

    4: Refresh the Agent/Connection

    After granting permissions, it can take up to 10–15 minutes for the RBAC changes to propagate through Entra ID. After waiting, restart your agent or re-run the thread to see if the vectorization error clears.

    Documentation:


    I hope it helps. Kindly accept and upvote the answer for other community members.

    Was this answer helpful?

    0 comments No comments

  2. Deepanshu katara 18,150 Reputation points MVP Volunteer Moderator
    2025-11-11T09:57:49.0733333+00:00

    Hi, Welcome to MS Q&A

    The error you’re encountering —

    “Could not complete vectorization action. The service failed to authenticate to the vectorization endpoint.” — is typically an authentication/authorization issue between Azure AI Search and the embedding model endpoint (such as Azure OpenAI Service). Here are the key causes and a step-by-step checklist to resolve it.

    Common causes & fixes

    • The search service’s managed identity or service principal isn’t granted permission to call the embedding model. Microsoft Learn+2Microsoft Learn+2
    • API key or endpoint used in the vectorizer configuration is incorrect or missing. Microsoft Learn+2Microsoft Learn+2
    • Network restrictions (firewalls/private endpoints) impede the search service from reaching the vectorization endpoint. Microsoft Learn+2Azure Documentation+2
    • The vectorizer configuration (in the index definition) is mis-aligned (wrong model name, deployment Id, or version) so the call fails authentication. GitHub+1

    Pls check link share above for fix

    Thanks

    Deepanshu

    Was this answer helpful?

    0 comments No comments

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.