[Azure AI Search] Internal Server Error when creating CMK encrypted objects
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
UPDATED: Azure outage affecting Windows Updates and related services
UPDATED 1:45 PM PST: Resolution efforts are complete at this time, and Windows services are expected to be back to normal. Notices related to ...
Native Agent Memory for Microsoft Agent Framework, Powered by Azure Cosmos DB
Recently we introduced the Agent Memory Toolkit and the Agentic Retrieval Toolkit for Azure Cosmos DB. The Agent Memory Toolkit gives your age...
Building AI Chatbots with Copilot Studio and Azure OpenAI (Complete 2026 Guide)
Introduction Artificial Intelligence has fundamentally changed how businesses interact with customers, employees and partners. Modern organisa...
Build locally, ship to Azure: meet Azure SQL Developer
Big news: Azure SQL Developer is here, in private preview. It’s the Azure SQL Database engine, on your laptop, in a container. Build aga...
Azure Developer vs Azure Administrator: Which Azure Career Path Should You Choose in 2026?
Introduction Cloud computing has become the backbone of modern businesses, and Microsoft Azure continues to be one of the world’s leadin...
Azure Developer Roadmap 2026: Skills, Certifications, Projects, and Career Path
Introduction Cloud computing has become the backbone of modern software development, and Microsoft Azure is one of the world’s leading c...
July Patches for Azure DevOps Server
We are releasing new patches for our self‑hosted product, Azure DevOps Server. We strongly recommend that all customers stay up to date with t...
What Is Azure AI Foundry and Why Should Developers Learn It? (Complete 2026 Guide)
Introduction Artificial Intelligence is no longer a futuristic technology—it’s becoming a core component of modern software development....
AI agents, meet the Azure Cosmos DB vNext emulator
If you use the Azure Cosmos DB vNext emulator, you probably know the local development loop: start the emulator, connect to it, create some re...