[Azure AI Search] Internal Server Error when creating CMK encrypted objects
![[Azure AI Search] Internal Server Error when creating CMK encrypted objects [Azure AI Search] Internal Server Error when creating CMK encrypted objects](https://cdn.techcommunity.microsoft.com/assets/Azure/BlogPreview_default-blue.png)
Scenario
Customers follow the Microsoft doc to create CMK encrypted objects (data source, index etc.), but get the 500 Internal Server Error:
{'error':{'code':'','message':'Could not use key vault key to wrap/unwrap the encryption key. {\\'Message\\':\\'An error has occurred.\\'}'}
Possible Causes
- The key vault host is incorrect, e.g. incorrect key vault domain.
- Action: check the keyVaultUri in the Json payload.
- The key vault host is inaccessible to search. For example, the key vault has public network access disabled but does not have a shared private link (SPL) configured from search.
- Action: check the SPL configurations or create a SPL.
Note that if the key vault Uri is correct or accessible, the error message due to a wrong key vault key name or version in the JSON payload is slightly different. The error message has the complete key vault key path.
{
"error": {
"code": "",
"message": "Could not use key vault key https://keyvaultname.vault.azure.net:443/keys/wrongkeyname to wrap/unwrap the encryption key. The key vault key cannot be found."
}
}
Published on:
Learn moreRelated posts
Cognitive services and Azure ML for Dataflows will be fully retired by September 15th, 2025
This blog is outlining the depreciation announcement for Azure ML and Cognitive services using dataflows.
Azure Developer CLI: From Dev to Prod with One Click
This post walks through how to implement a “build once, deploy everywhere” pattern using Azure Developer CLI (azd) that provisions...
Azure Migrate assessments
AI Builder – Invoice processing and Invoices document type to begin using Azure
Starting on July 21, 2025, the prebuilt model invoice processing and invoices document type (built on Azure Document Intelligence 4.0) will be...
Dataverse: Learn How to Implement Azure Durable Functions – Payment Scenario
Azure Durable Functions is an extension of Azure Functions that offers specialized capabilities, including statefulness, orchestration, handli...
Build reliable Go applications: Configuring Azure Cosmos DB Go SDK for real-world scenarios
When building applications that interact with databases, developers frequently encounter scenarios where default SDK configurations don’...
Azure Migrate project creation
Webinar: Smart Document Management in SharePoint with Copilot Agents & Azure AI
Managing a flood of incoming documents, whether for loan applications, onboarding, or compliance, can quickly become chaotic. Manually sorting...
Building Event-Driven Go applications with Azure Cosmos DB and Azure Functions
The Go programming language is a great fit for building serverless applications. Go applications can be easily compiled to a single, staticall...