microsoft/kernel-memory

Support Managed Identity Authentication for AI Search

nhandangms opened this issue · 2 comments

Context / Scenario

Hi team,
Our AI service is using Kernel Memory for retrieval part from Azure Cognitive Search (AI Search) memory. We are going to move from authentication using access key to managed identity as soon as possible.

Question

Have Kernel Memory support Managed Identity Authentication for AI Search yet? If yes, can we get more details on how to set it up, please? If not, can we get some ETA plan on when this feature can be delivered, please?

dluc commented

hello there, yes Managed Identities are supported, here's a quick example:

var builder = new KernelMemoryBuilder()
  .WithAzureAISearchMemoryDb(new AzureAISearchConfig { Auth = AzureAISearchConfig.AuthTypes.AzureIdentity })
  .WithAzureBlobsDocumentStorage(new AzureBlobsConfig { Auth = AzureBlobsConfig.AuthTypes.AzureIdentity })
  .WithAzureOpenAITextGeneration(new AzureOpenAIConfig { Auth = AzureOpenAIConfig.AuthTypes.AzureIdentity })
  .WithAzureOpenAITextEmbeddingGeneration(new AzureOpenAIConfig { Auth = AzureOpenAIConfig.AuthTypes.AzureIdentity })

Great, thank you so much your prompt reply.