We're wanting to automatically rotate our Azure Search Admin and Query keys with our Key Vault on a regular basis. Is there a recommend way to do this?
Ideally we'd be able to use Managed Identity to access the Search service, but that doesn't seem to be supported yet.
The key rotation process relies on the fact that the services have both a primary and a secondary key. Both keys are valid for any requests, and they can be changed independently of each other. We’ll deploy our azure search, which will include referencing that key and making sure our application uses it. Then we’ll rotate the other key.
You could refer to this article to set up key rotation using Azure Automation.You'll use PowerShell combined with Azure Automation to change an Azure search admin key. You'll then update a key vault secret with that new key.