Is there a service connector for Azure AI Search

Vinod Kumar 0 Reputation points
2024-07-20T23:42:33.27+00:00

I have an Azure app service. Service connectors are amazing to setup RBAC between services. However, I do not see any service connectors for AI search. Am I missing something?

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.
861 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,362 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 7,206 Reputation points
    2024-07-21T16:31:40.9966667+00:00

    Hello Vinod Kumar,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    Problem

    I understand that you did not see any service connectors for AI search and your Azure app service will need Service connectors as an amazing setup for RBAC between services.

    Solution

    Azure App Service doesn't directly offer service connectors specifically for Azure AI Search. Service connectors simplify the setup of Role-Based Access Control (RBAC) between services, but Azure AI Search isn't included in the available connectors.

    To do the setup, you have many options such as manual set up.

    Manual.

    You set up the necessary permissions manually by following these steps:

    1. Ensure that your App Service has a managed identity enabled, which will act as the service principal for accessing Azure AI Search.
    2. Assign the appropriate roles to the managed identity to allow it to access Azure AI Search. You typically need to assign the "Cognitive Services User" role.
      1. Go to your Azure AI Search resource.
      2. Navigate to "Access control (IAM)".
      3. Click on "Add role assignment".
      4. Select the "Cognitive Services User" role.
      5. Assign this role to the managed identity of your Azure App Service.
    3. Update your App Service to use the managed identity for accessing Azure AI Search. So, in your App Service, go to "Identity" and ensure the managed identity is turned on. Then, use this identity to authenticate requests to Azure AI Search.
    4. In your application code, use the managed identity to authenticate and make requests to Azure AI Search. Here's an example of how you can do this in C#:
     using Microsoft.Azure.Services.AppAuthentication;
       using Microsoft.Azure.Search;
       // Get the managed identity token
       var azureServiceTokenProvider = new AzureServiceTokenProvider();
       string accessToken = await azureServiceTokenProvider.GetAccessTokenAsync("https://search.azure.com/");
       // Create a search client with the access token
       var searchClient = new SearchServiceClient("YourSearchServiceName", new SearchCredentials(accessToken));
    

    With the above steps, you can effectively set up RBAC between your Azure App Service and Azure AI Search, even though there's no direct service connector available.

    Secondly, Azure AI Search Data Sources.

    You can use data source connectors to simplify data ingestion into an Azure AI Search index. These connectors allow you to pull in content from various Azure services and other sources. Some generally available data sources include:

    • Azure Blob Storage
    • Azure Cosmos DB (SQL API)
    • Azure SQL Database
    • Azure Table Storage
    • Azure Data Lake Storage Gen2

    Additionally, there are preview data sources like Fabric OneLake files, Azure Cosmos DB for Apache Gremlin, and Azure Cosmos DB for MongoDB.

    Thirdly, Logic Apps Integration.

    You can use Azure Logic Apps to integrate enterprise data and services with AI technologies.

    The Azure OpenAI and Azure AI Search built-in connectors within Logic Apps allow you to create powerful automations. These connectors support various authentication types, such as API keys, Microsoft Entra ID, and managed identities.

    References

    https://learn.microsoft.com/en-us/AZURE/search/search-data-sources-gallery.

    https://learn.microsoft.com/en-us/azure/logic-apps/connectors/azure-ai.

    https://techcommunity.microsoft.com/t5/azure-integration-services-blog/public-preview-of-azure-openai-and-ai-search-in-app-connectors/ba-p/4049584.

    https://azure.microsoft.com/en-us/updates/public-preview-of-azure-openai-and-ai-search-inapp-connectors-for-logic-apps-standard/.

    Accept Answer

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.

    Best Regards,

    Sina Salam

    0 comments No comments